cgroup_enable_task_cg_lists && PF_EXITING (Was: KCSAN: data-race in exit_signals / prepare_signal)

2019-10-21 Thread Oleg Nesterov
could you explain the usage of siglock/PF_EXITING in cgroup_enable_task_cg_lists() ? PF_EXITING is protected by cgroup_threadgroup_rwsem, not by sighand->siglock. Oleg.

Re: KCSAN: data-race in exit_signals / prepare_signal

2019-10-21 Thread Oleg Nesterov
On 10/21, Marco Elver wrote: > > On Mon, 21 Oct 2019 at 14:00, Oleg Nesterov wrote: > > > > I think this is WONTFIX. > > If taking the spinlock is unnecessary (which AFAIK it probably is) and > there are no other writers to this flag, you will still need a > WRITE_ONCE(tsk->flags, tsk->flags |

Re: KCSAN: data-race in exit_signals / prepare_signal

2019-10-21 Thread Christian Brauner
On Mon, Oct 21, 2019 at 02:00:30PM +0200, Oleg Nesterov wrote: > On 10/21, Christian Brauner wrote: > > > > This traces back to Oleg fixing a race between a group stop and a thread > > exiting before it notices that it has a pending signal or is in the middle > > of > > do_exit() already, causing

Re: KCSAN: data-race in exit_signals / prepare_signal

2019-10-21 Thread Marco Elver
On Mon, 21 Oct 2019 at 14:00, Oleg Nesterov wrote: > > On 10/21, Christian Brauner wrote: > > > > This traces back to Oleg fixing a race between a group stop and a thread > > exiting before it notices that it has a pending signal or is in the middle > > of > > do_exit() already, causing group

Re: KCSAN: data-race in exit_signals / prepare_signal

2019-10-21 Thread Oleg Nesterov
On 10/21, Christian Brauner wrote: > > This traces back to Oleg fixing a race between a group stop and a thread > exiting before it notices that it has a pending signal or is in the middle of > do_exit() already, causing group stop to get wacky. > The original commit to fix this race is > commit

Re: KCSAN: data-race in exit_signals / prepare_signal

2019-10-21 Thread Christian Brauner
ve any reproducer for this crash yet. > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+492a4acccd8fc75dd...@syzkaller.appspotmail.com > > ========== > BUG: KCSAN: data-r

KCSAN: data-race in exit_signals / prepare_signal

2019-10-21 Thread syzbot
-by: syzbot+492a4acccd8fc75dd...@syzkaller.appspotmail.com == BUG: KCSAN: data-race in exit_signals / prepare_signal read to 0x888103566064 of 4 bytes by interrupt on cpu 0: sig_task_ignored kernel/signal.c:94 [inline] sig_ignored