From 0967237ca6521c63822340138e4d62ecf8a3d173 Mon Sep 17 00:00:00 2001 From: Tony Luck Date: Thu, 20 Sep 2012 11:47:13 -0700 Subject: [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: [] show_stack+0x80/0xa0 [] dump_stack+0x30/0x50 [] warn_slowpath_common+0xc0/0x100 [] warn_slowpath_null+0x40/0x60 [] local_bh_enable_ip+0x150/0x180 [] _raw_write_unlock_bh+0x40/0x60 [] unix_release_sock+0x120/0x5a0 [] unix_release+0x40/0x60 [] sock_release+0x60/0x1a0 [] sock_close+0x30/0xa0 [] __fput+0x190/0x500 [] ____fput+0x20/0x40 [] task_work_run+0x1b0/0x260 [] do_notify_resume_user+0x110/0x2a0 [] notify_resume_user+0x40/0x60 [] skip_rbs_switch+0xe0/0xf0 [] ia64_ivt+0xffffffff00040720/0x400 Fix-suggested-by: Al Viro Signed-off-by: Tony Luck --- arch/ia64/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index dd6fc1449741..cf84a2f37c13 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -196,8 +196,8 @@ do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall) ia64_do_signal(scr, in_syscall); } - if (test_thread_flag(TIF_NOTIFY_RESUME)) { - clear_thread_flag(TIF_NOTIFY_RESUME); + if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { + local_irq_enable(); /* force interrupt enable */ tracehook_notify_resume(&scr->pt); } -- cgit v1.2.3