linux/drivers/char/ipmi
Bodo Stroesser 48e8ac2979 ipmi: Fix a race restarting the timer
With recent changes it is possible for the timer handler to detect an
idle interface and not start the timer, but the thread to start an
operation at the same time.  The thread will not start the timer in that
instance, resulting in the timer not running.

Instead, move all timer operations under the lock and start the timer in
the thread if it detect non-idle and the timer is not already running.
Moving under locks allows the last timeout to be set in both the thread
and the timer.  'Timer is not running' means that the timer is not
pending and smi_timeout() is not running.  So we need a flag to detect
this correctly.

Also fix a few other timeout bugs: setting the last timeout when the
interrupt has to be disabled and the timer started, and setting the last
timeout in check_start_timer_thread possibly racing with the timer

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-17 12:23:06 -07:00
..
ipmi_bt_sm.c Char: ipmi_bt_sm, fix infinite loop 2014-04-17 12:23:06 -07:00
ipmi_devintf.c ipmi: info leak in compat_ipmi_ioctl() 2013-09-05 08:34:31 -07:00
ipmi_kcs_sm.c ipmi: use USEC_PER_SEC instead of 1000000 for more meaningful 2014-01-25 15:31:58 -08:00
ipmi_msghandler.c ipmi: Initialize locals to avoid warning 2013-09-05 08:34:31 -07:00
ipmi_poweroff.c char: Convert use of typedef ctl_table to struct ctl_table 2013-06-17 16:43:08 -07:00
ipmi_si_intf.c ipmi: Fix a race restarting the timer 2014-04-17 12:23:06 -07:00
ipmi_si_sm.h
ipmi_smic_sm.c ipmi: use USEC_PER_SEC instead of 1000000 for more meaningful 2014-01-25 15:31:58 -08:00
ipmi_watchdog.c char/ipmi: remove local ioctl defines replaced by generic ones 2012-07-23 12:48:04 +02:00
Kconfig
Makefile drivers/char/ipmi/Makefile: replace the use of <module>-objs with <module>-y 2010-10-27 18:03:14 -07:00