From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Galbraith Subject: [patch] rt,workqueue: Fix blocking call when !TASK_RUNNING splat in rescuer_thread() Date: Sat, 27 Feb 2016 08:05:55 +0100 Message-ID: <1456556755.3759.4.camel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Thomas Gleixner , linux-rt-users To: Sebastian Andrzej Siewior Return-path: Received: from mail-wm0-f49.google.com ([74.125.82.49]:33555 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751408AbcB0HF6 (ORCPT ); Sat, 27 Feb 2016 02:05:58 -0500 Received: by mail-wm0-f49.google.com with SMTP id g62so96991411wme.0 for ; Fri, 26 Feb 2016 23:05:57 -0800 (PST) Sender: linux-rt-users-owner@vger.kernel.org List-ID: [ 0.221225] ------------[ cut here ]------------ [ 0.221241] WARNING: CPU: 1 PID: 69 at kernel/sched/core.c:7733 __might_sleep+0x7f/0x90() [ 0.221253] do not call blocking ops when !TASK_RUNNING; state=1 set at [] rescuer_thread+0x64/0x340 [ 0.221263] Modules linked in: [ 0.221272] CPU: 1 PID: 69 Comm: khelper Not tainted 4.0.0-rt4-lockdep #71 [ 0.221273] Hardware name: IBM System x3550 M3 -[7944K3G]-/69Y5698 , BIOS -[D6E150AUS-1.10]- 12/15/2010 [ 0.221280] ffffffff81a2269f ffff8801789a7cc8 ffffffff81605182 0000000000000002 [ 0.221282] ffff8801789a7d18 ffff8801789a7d08 ffffffff81053cda ffff8801789a7d48 [ 0.221284] ffffffff81a23b44 0000000000000394 0000000000000000 0000000000000000 [ 0.221284] Call Trace: [ 0.221288] [] dump_stack+0x4f/0x9d [ 0.221291] [] warn_slowpath_common+0x8a/0xe0 [ 0.221293] [] warn_slowpath_fmt+0x46/0x50 [ 0.221295] [] ? rescuer_thread+0x64/0x340 [ 0.221296] [] ? rescuer_thread+0x64/0x340 [ 0.221298] [] __might_sleep+0x7f/0x90 [ 0.221299] [] ? worker_thread+0x4d0/0x4d0 [ 0.221301] [] rt_spin_lock+0x24/0x70 [ 0.221304] [] ? migrate_disable+0x7d/0xe0 [ 0.221305] [] rescuer_thread+0xa9/0x340 [ 0.221307] [] ? worker_thread+0x4d0/0x4d0 [ 0.221308] [] ? worker_thread+0x4d0/0x4d0 [ 0.221311] [] kthread+0xe1/0x100 [ 0.221312] [] ? _raw_spin_unlock_irq+0x30/0x70 [ 0.221315] [] ? __kthread_parkme+0xa0/0xa0 [ 0.221317] [] ret_from_fork+0x58/0x90 [ 0.221319] [] ? __kthread_parkme+0xa0/0xa0 [ 0.221320] ---[ end trace 0000000000000001 ]--- Signed-off-by: Mike Galbraith --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2255,8 +2255,6 @@ static int rescuer_thread(void *__rescue */ rescuer->task->flags |= PF_WQ_WORKER; repeat: - set_current_state(TASK_INTERRUPTIBLE);