* WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236
@ 2015-11-30 16:20 Sasha Levin
2015-11-30 16:44 ` Al Viro
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2015-11-30 16:20 UTC (permalink / raw)
To: Ingo Molnar, Al Viro; +Cc: Peter Zijlstra, LKML
Hi all,
I've hit the following while fuzzing with trinity on the latest -next kernel:
[ 587.536319] WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236 sigsuspend+0x194/0x1b0()
[ 587.540863] Modules linked in:
[ 587.541742] CPU: 12 PID: 16862 Comm: trinity-c421 Not tainted 4.4.0-rc2-next-20151127-sasha-00011-g1ca161c-dirty #2660
[ 587.543554] 0000000000000000 000000002c914859 ffff8806e3347e38 ffffffff9ea923db
[ 587.545672] 0000000000000000 ffff8800c8032000 ffffffffa64a5120 ffff8806e3347e78
[ 587.547042] ffffffff9d2e00d9 ffffffff9d307334 ffffffffa64a5120 00000000000000ec
[ 587.549585] Call Trace:
[ 587.550261] [<ffffffff9ea923db>] dump_stack+0x72/0xb7
[ 587.551125] [<ffffffff9d2e00d9>] warn_slowpath_common+0x109/0x130
[ 587.553088] [<ffffffff9d2e0329>] warn_slowpath_null+0x29/0x30
[ 587.554164] [<ffffffff9d307334>] sigsuspend+0x194/0x1b0
[ 587.555116] [<ffffffff9d30b47b>] SyS_rt_sigsuspend+0xbb/0x110
[ 587.561511] [<ffffffffa61fbbd5>] entry_SYSCALL_64_fastpath+0x35/0x99
[ 587.563289] ---[ end trace 76d0b7c8c18c2a7d ]---
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236
2015-11-30 16:20 WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236 Sasha Levin
@ 2015-11-30 16:44 ` Al Viro
2015-11-30 16:52 ` Peter Zijlstra
0 siblings, 1 reply; 5+ messages in thread
From: Al Viro @ 2015-11-30 16:44 UTC (permalink / raw)
To: Sasha Levin; +Cc: Ingo Molnar, Peter Zijlstra, LKML
On Mon, Nov 30, 2015 at 11:20:44AM -0500, Sasha Levin wrote:
> Hi all,
>
> I've hit the following while fuzzing with trinity on the latest -next kernel:
__set_current_state(TASK_INTERRUPTIBLE);
schedule();
set_restore_sigmask();
somehow got out of schedule() without TIF_SIGPENDING being set...
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236
2015-11-30 16:44 ` Al Viro
@ 2015-11-30 16:52 ` Peter Zijlstra
2015-11-30 18:48 ` Oleg Nesterov
0 siblings, 1 reply; 5+ messages in thread
From: Peter Zijlstra @ 2015-11-30 16:52 UTC (permalink / raw)
To: Al Viro; +Cc: Sasha Levin, Ingo Molnar, LKML, Oleg Nesterov
On Mon, Nov 30, 2015 at 04:44:05PM +0000, Al Viro wrote:
> On Mon, Nov 30, 2015 at 11:20:44AM -0500, Sasha Levin wrote:
> > Hi all,
> >
> > I've hit the following while fuzzing with trinity on the latest -next kernel:
>
> __set_current_state(TASK_INTERRUPTIBLE);
> schedule();
> set_restore_sigmask();
>
> somehow got out of schedule() without TIF_SIGPENDING being set...
A random wakeup (which are always possible) can make that happen, right?
I'm (as always) a little vague on signals, but who is responsible for
setting that bit?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236
2015-11-30 16:52 ` Peter Zijlstra
@ 2015-11-30 18:48 ` Oleg Nesterov
2016-01-09 7:08 ` Al Viro
0 siblings, 1 reply; 5+ messages in thread
From: Oleg Nesterov @ 2015-11-30 18:48 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Al Viro, Sasha Levin, Ingo Molnar, LKML
On 11/30, Peter Zijlstra wrote:
>
> On Mon, Nov 30, 2015 at 04:44:05PM +0000, Al Viro wrote:
> > On Mon, Nov 30, 2015 at 11:20:44AM -0500, Sasha Levin wrote:
> > > Hi all,
> > >
> > > I've hit the following while fuzzing with trinity on the latest -next kernel:
> >
> > __set_current_state(TASK_INTERRUPTIBLE);
> > schedule();
> > set_restore_sigmask();
> >
> > somehow got out of schedule() without TIF_SIGPENDING being set...
>
> A random wakeup (which are always possible) can make that happen, right?
Yes, sigsuspend() should do "while (!signal_pending(current))". Like
sys_pause() does, -ERESTARTNOHAND without signal_pending() is equally
wrong.
I'll send the fix unless Sasha wants to do this.
> I'm (as always) a little vague on signals, but who is responsible for
> setting that bit?
See above, TS_RESTORE_SIGMASK doesn't differ from -ERESTART* in that
you can only use it if signal_pending() is true.
Oleg.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236
2015-11-30 18:48 ` Oleg Nesterov
@ 2016-01-09 7:08 ` Al Viro
0 siblings, 0 replies; 5+ messages in thread
From: Al Viro @ 2016-01-09 7:08 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: Peter Zijlstra, Sasha Levin, Ingo Molnar, LKML
On Mon, Nov 30, 2015 at 07:48:04PM +0100, Oleg Nesterov wrote:
> Yes, sigsuspend() should do "while (!signal_pending(current))". Like
> sys_pause() does, -ERESTARTNOHAND without signal_pending() is equally
> wrong.
>
> I'll send the fix unless Sasha wants to do this.
Looks like neither mainline nor -next has that...
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-09 7:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 16:20 WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236 Sasha Levin
2015-11-30 16:44 ` Al Viro
2015-11-30 16:52 ` Peter Zijlstra
2015-11-30 18:48 ` Oleg Nesterov
2016-01-09 7:08 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox