Commit 0967237ca6521c63822340138e4d62ecf8a3d173
1 parent
36a45e7417
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
[IA64] Must enable interrupts in do_notify_resume_user before calling tracehook_notify_resume()
If we call with interrupts disabled, we'll be hit with: WARNING: at kernel/softirq.c:160 local_bh_enable_ip+0x150/0x180() and a stack trace like this: Call Trace: [<a000000100015480>] show_stack+0x80/0xa0 [<a000000100d9a520>] dump_stack+0x30/0x50 [<a000000100072fc0>] warn_slowpath_common+0xc0/0x100 [<a000000100073040>] warn_slowpath_null+0x40/0x60 [<a0000001000884d0>] local_bh_enable_ip+0x150/0x180 [<a000000100da2960>] _raw_write_unlock_bh+0x40/0x60 [<a000000100cf03c0>] unix_release_sock+0x120/0x5a0 [<a000000100cf0880>] unix_release+0x40/0x60 [<a000000100b84400>] sock_release+0x60/0x1a0 [<a000000100b84b70>] sock_close+0x30/0xa0 [<a0000001001d10f0>] __fput+0x190/0x500 [<a0000001001d1580>] ____fput+0x20/0x40 [<a0000001000b6570>] task_work_run+0x1b0/0x260 [<a000000100015190>] do_notify_resume_user+0x110/0x2a0 [<a00000010000c5a0>] notify_resume_user+0x40/0x60 [<a00000010000c4d0>] skip_rbs_switch+0xe0/0xf0 [<a000000000040720>] ia64_ivt+0xffffffff00040720/0x400 Fix-suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Tony Luck <tony.luck@intel.com>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
arch/ia64/kernel/process.c
... | ... | @@ -196,8 +196,8 @@ |
196 | 196 | ia64_do_signal(scr, in_syscall); |
197 | 197 | } |
198 | 198 | |
199 | - if (test_thread_flag(TIF_NOTIFY_RESUME)) { | |
200 | - clear_thread_flag(TIF_NOTIFY_RESUME); | |
199 | + if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | |
200 | + local_irq_enable(); /* force interrupt enable */ | |
201 | 201 | tracehook_notify_resume(&scr->pt); |
202 | 202 | } |
203 | 203 |