* [GIT PULL] workqueue changes for v4.11-rc2
@ 2017-03-14 20:10 Tejun Heo
0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2017-03-14 20:10 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, Lai Jiangshan
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-14 20:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 20:10 [GIT PULL] workqueue changes for v4.11-rc2 Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).