Files
linux/kernel
Tejun Heo 4afca924c0 workqueue: convert BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s
commit fc4b514f27 upstream.

8852aac25e ("workqueue: mod_delayed_work_on() shouldn't queue timer on
0 delay") unexpectedly uncovered a very nasty abuse of delayed_work in
megaraid - it allocated work_struct, casted it to delayed_work and
then pass that into queue_delayed_work().

Previously, this was okay because 0 @delay short-circuited to
queue_work() before doing anything with delayed_work.  8852aac25e
moved 0 @delay test into __queue_delayed_work() after sanity check on
delayed_work making megaraid trigger BUG_ON().

Although megaraid is already fixed by c1d390d8e6 ("megaraid: fix
BUG_ON() from incorrect use of delayed work"), this patch converts
BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s so that such
abusers, if there are more, trigger warning but don't crash the
machine.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Xiaotian Feng <xtfeng@gmail.com>
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-17 10:37:43 -08:00
..
2011-07-26 16:49:45 -07:00
2012-08-15 08:10:29 -07:00
2012-07-16 09:04:42 -07:00
2011-03-14 09:15:23 -04:00
2011-09-23 12:05:29 +05:30
2011-07-14 12:59:14 +03:00
2012-03-28 18:30:03 +01:00
2008-07-28 14:37:38 +02:00
2012-03-29 19:52:46 +08:00
2012-03-23 16:58:41 -07:00
2012-07-16 09:04:42 -07:00
2012-03-28 18:30:03 +01:00
2011-10-31 17:30:44 -07:00
2012-10-28 10:14:13 -07:00
2011-09-19 17:04:37 -07:00
2012-03-15 18:17:55 -07:00