Changed BUG_ON()s in queue_delayed_work() to WARN_ON_ONCE()s so that incorrect use of delayed_work() triggers warnings, but doesn't crash the system. This change is back-ported from upstream change that converted BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s.
Upstream commit: fc4b514f2727f74a4587c31db87e0e93465518c3 Tested on Stable Trees: 3.0.x, 3.4.x, 3.6.x Signed-off-by: Tejun Heo <[email protected]> Cc: Xiaotian Feng <[email protected]> Signed-off-by: Shuah Khan <[email protected]> CC: [email protected] --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 872bd6d..3262ea9 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1143,8 +1143,8 @@ int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work))) { unsigned int lcpu; - BUG_ON(timer_pending(timer)); - BUG_ON(!list_empty(&work->entry)); + WARN_ON_ONCE(timer_pending(timer)); + WARN_ON_ONCE(!list_empty(&work->entry)); timer_stats_timer_set_start_info(&dwork->timer); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
