From 1a06c911c0d31cf6a1c3e61e2bdf163b123d4608 Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Mon, 14 Sep 2015 14:44:55 +0200 Subject: [PATCH] workqueue: Add might_sleep() on the top of __cancel_work_timer() For more details see [1]. [1] http://marc.info/?t=144179442100006&r=1&w=2 Suggested-by: Lai Jiangshan CC: Tejun Heo --- kernel/workqueue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 4c4f06176f74..adf2a0c33341 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2768,6 +2768,8 @@ static bool __cancel_work_timer(struct work_struct *work, bool is_dwork) unsigned long flags; int ret; + might_sleep(); + do { ret = try_to_grab_pending(work, is_dwork, &flags); /* -- 2.5.2