diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-14 14:52:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-14 14:52:08 -0700 |
commit | bc25887935dba31be8f253dd5129e5004a346d97 (patch) | |
tree | 8c761d6d44941f8052e166b87c05d10d6c2a988a /kernel | |
parent | 83e632267591bc2e0d2d13e41b64340c2d3cedfe (diff) | |
parent | 637fdbae60d6cb9f6e963c1079d7e0445c86ff7d (diff) | |
download | linux-bc25887935dba31be8f253dd5129e5004a346d97.tar.bz2 |
Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fix from Tejun Heo:
"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"
* 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 072cbc9b175d..c0168b7da1ea 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)); |