3.18.47-rt52-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Andrzej Siewior The RCU sched protection was changed to RCU only and so all IRQ-off and preempt-off disabled region were changed to the relevant rcu-read-lock primitives. One was missed and triggered: |[ BUG: bad unlock balance detected! ] |4.4.30-rt41 #51 Tainted: G W |btattach/345 is trying to release lock ( |Unable to handle kernel paging request at virtual address 6b6b6bbb |Backtrace: |[] (lock_release) from [] (rt_spin_unlock+0x20/0x30) |[] (rt_spin_unlock) from [] (put_pwq_unlocked+0xa4/0x118) |[] (put_pwq_unlocked) from [] (destroy_workqueue+0x164/0x1b0) |[] (destroy_workqueue) from [] (hci_unregister_dev+0x120/0x21c) |[] (hci_unregister_dev) from [] (hci_uart_tty_close+0x90/0xbc) |[] (hci_uart_tty_close) from [] (tty_ldisc_close+0x50/0x58) |[] (tty_ldisc_close) from [] (tty_ldisc_kill+0x18/0x78) |[] (tty_ldisc_kill) from [] (tty_ldisc_release+0x100/0x134) |[] (tty_ldisc_release) from [] (tty_release+0x3bc/0x460) |[] (tty_release) from [] (__fput+0xe0/0x1b4) |[] (__fput) from [] (____fput+0x10/0x14) |[] (____fput) from [] (task_work_run+0xa4/0xb8) |[] (task_work_run) from [] (do_exit+0x40c/0x8b0) |[] (do_exit) from [] (do_group_exit+0x54/0xc4) Cc: stable-rt@vger.kernel.org Reported-by: John Keeping Tested-by: John Keeping Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt (VMware) --- kernel/workqueue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 6122f386dd5d..8af30f579c15 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1109,9 +1109,11 @@ static void put_pwq_unlocked(struct pool_workqueue *pwq) * As both pwqs and pools are RCU protected, the * following lock operations are safe. */ + rcu_read_lock(); local_spin_lock_irq(pendingb_lock, &pwq->pool->lock); put_pwq(pwq); local_spin_unlock_irq(pendingb_lock, &pwq->pool->lock); + rcu_read_unlock(); } } -- 2.10.2