]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ip2: avoid add_timer with pending timer
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 13 Oct 2008 09:35:05 +0000 (10:35 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Oct 2008 16:51:39 +0000 (09:51 -0700)
commit9d020a2e5fd2c79f5b08a6cab2b02e7231d7cb84
tree2c3d42f2a0fd4617d2e708e91dae6bbc4b4a5c15
parentf1ddfd950221cca4d7ba753a71bc4b8930a42a43
ip2: avoid add_timer with pending timer

add_timer() is not supposed to be called when the timer is pending.
ip2 driver attempts to avoid that condition by setting and resetting
a flag (TimerOn) in timer function. But there is some gap between
add_timer() and setting TimerOn.

This patch fix this problem by using mod_timer() and remove TimerOn
which has been unnecessary by this change.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ip2/ip2main.c