Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1280065 > unrolled thread

WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236

Started bySasha Levin <sasha.levin@oracle.com>
First post2015-11-30 17:30 +0100
Last post2015-11-30 19:50 +0100
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  WARNING: CPU: 12 PID: 16862 at  ./arch/x86/include/asm/thread_info.h:236 Sasha Levin <sasha.levin@oracle.com> - 2015-11-30 17:30 +0100
    Re: WARNING: CPU: 12 PID: 16862 at  ./arch/x86/include/asm/thread_info.h:236 Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-30 17:50 +0100
      Re: WARNING: CPU: 12 PID: 16862 at  ./arch/x86/include/asm/thread_info.h:236 Peter Zijlstra <peterz@infradead.org> - 2015-11-30 18:00 +0100
        Re: WARNING: CPU: 12 PID: 16862 at  ./arch/x86/include/asm/thread_info.h:236 Oleg Nesterov <oleg@redhat.com> - 2015-11-30 19:50 +0100

#1280065 — WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236

FromSasha Levin <sasha.levin@oracle.com>
Date2015-11-30 17:30 +0100
SubjectWARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236
Message-ID<qAzuW-5YC-27@gated-at.bofh.it>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1280100

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2015-11-30 17:50 +0100
Message-ID<qAzOi-66r-25@gated-at.bofh.it>
In reply to#1280065
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...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1280106

FromPeter Zijlstra <peterz@infradead.org>
Date2015-11-30 18:00 +0100
Message-ID<qAzXY-69w-11@gated-at.bofh.it>
In reply to#1280100
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1280195

FromOleg Nesterov <oleg@redhat.com>
Date2015-11-30 19:50 +0100
Message-ID<qABGq-7gu-23@gated-at.bofh.it>
In reply to#1280106
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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web