lkml.org 
[lkml]   [2017]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[GIT PULL] workqueue changes for v4.11-rc2
Hello,

* If a delayed work is queued with NULL @wq, workqueue code explodes
after the timer expires at which point it's difficult to tell who
the culprit was. This actually happened and the offender was
net/smc this time. Add an explicit sanity check for it in the
queueing path.

Thanks.

The following changes since commit c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201:

Linux 4.11-rc1 (2017-03-05 12:59:56 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-4.11-fixes

for you to fetch changes up to 637fdbae60d6cb9f6e963c1079d7e0445c86ff7d:

workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq (2017-03-06 15:33:42 -0500)

----------------------------------------------------------------
Tejun Heo (1):
workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq

kernel/workqueue.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 072cbc9..c0168b7 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1507,6 +1507,7 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
struct timer_list *timer = &dwork->timer;
struct work_struct *work = &dwork->work;

+ WARN_ON_ONCE(!wq);
WARN_ON_ONCE(timer->function != delayed_work_timer_fn ||
timer->data != (unsigned long)dwork);
WARN_ON_ONCE(timer_pending(timer));
--
tejun

\
 
 \ /
  Last update: 2017-03-14 21:11    [W:0.038 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site