Re: [PATCH v2] taskstats: fix data-race

2019-10-08 Thread Andrea Parri
> Oh ups, yeah of course :) > https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=taskstats_syzbot You forgot to update the commit msg. It looks good to me modulo that. Thanks, Andrea

Re: [PATCH v2] taskstats: fix data-race

2019-10-08 Thread Christian Brauner
On Tue, Oct 08, 2019 at 05:26:59PM +0200, Andrea Parri wrote: > On Tue, Oct 08, 2019 at 04:24:14PM +0200, Christian Brauner wrote: > > On Tue, Oct 08, 2019 at 04:20:35PM +0200, Andrea Parri wrote: > > > On Mon, Oct 07, 2019 at 04:18:26PM +0200, Dmitry Vyukov wrote: > > > > On Mon, Oct 7, 2019 at

Re: [PATCH v2] taskstats: fix data-race

2019-10-08 Thread Andrea Parri
On Tue, Oct 08, 2019 at 04:24:14PM +0200, Christian Brauner wrote: > On Tue, Oct 08, 2019 at 04:20:35PM +0200, Andrea Parri wrote: > > On Mon, Oct 07, 2019 at 04:18:26PM +0200, Dmitry Vyukov wrote: > > > On Mon, Oct 7, 2019 at 4:14 PM Andrea Parri > > > wrote: > > > > > > > > > > > static

Re: [PATCH v2] taskstats: fix data-race

2019-10-08 Thread Christian Brauner
On Tue, Oct 08, 2019 at 04:20:35PM +0200, Andrea Parri wrote: > On Mon, Oct 07, 2019 at 04:18:26PM +0200, Dmitry Vyukov wrote: > > On Mon, Oct 7, 2019 at 4:14 PM Andrea Parri wrote: > > > > > > > > > static struct taskstats *taskstats_tgid_alloc(struct task_struct > > > > > > *tsk) > > > > > >

Re: [PATCH v2] taskstats: fix data-race

2019-10-08 Thread Andrea Parri
On Mon, Oct 07, 2019 at 04:18:26PM +0200, Dmitry Vyukov wrote: > On Mon, Oct 7, 2019 at 4:14 PM Andrea Parri wrote: > > > > > > > static struct taskstats *taskstats_tgid_alloc(struct task_struct > > > > > *tsk) > > > > > { > > > > > struct signal_struct *sig = tsk->signal; > > > > > -

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Dmitry Vyukov
On Mon, Oct 7, 2019 at 4:14 PM Andrea Parri wrote: > > > > > static struct taskstats *taskstats_tgid_alloc(struct task_struct *tsk) > > > > { > > > > struct signal_struct *sig = tsk->signal; > > > > - struct taskstats *stats; > > > > + struct taskstats *stats_new, *stats; > > > >

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Andrea Parri
> > > static struct taskstats *taskstats_tgid_alloc(struct task_struct *tsk) > > > { > > > struct signal_struct *sig = tsk->signal; > > > - struct taskstats *stats; > > > + struct taskstats *stats_new, *stats; > > > > > > - if (sig->stats || thread_group_empty(tsk)) > > > -

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
On Mon, Oct 07, 2019 at 04:08:41PM +0200, Dmitry Vyukov wrote: > On Mon, Oct 7, 2019 at 3:55 PM Christian Brauner > wrote: > > > > On Mon, Oct 07, 2019 at 03:50:47PM +0200, Dmitry Vyukov wrote: > > > On Mon, Oct 7, 2019 at 3:18 PM Andrea Parri > > > wrote: > > > > > > > > On Mon, Oct 07, 2019

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Dmitry Vyukov
On Mon, Oct 7, 2019 at 3:55 PM Christian Brauner wrote: > > On Mon, Oct 07, 2019 at 03:50:47PM +0200, Dmitry Vyukov wrote: > > On Mon, Oct 7, 2019 at 3:18 PM Andrea Parri wrote: > > > > > > On Mon, Oct 07, 2019 at 01:01:17PM +0200, Christian Brauner wrote: > > > > When assiging and testing

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
On Mon, Oct 07, 2019 at 03:50:47PM +0200, Dmitry Vyukov wrote: > On Mon, Oct 7, 2019 at 3:18 PM Andrea Parri wrote: > > > > On Mon, Oct 07, 2019 at 01:01:17PM +0200, Christian Brauner wrote: > > > When assiging and testing taskstats in taskstats_exit() there's a race > > > when writing and

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Dmitry Vyukov
On Mon, Oct 7, 2019 at 3:18 PM Andrea Parri wrote: > > On Mon, Oct 07, 2019 at 01:01:17PM +0200, Christian Brauner wrote: > > When assiging and testing taskstats in taskstats_exit() there's a race > > when writing and reading sig->stats when a thread-group with more than > > one thread exits: > >

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
On Mon, Oct 07, 2019 at 03:18:04PM +0200, Andrea Parri wrote: > On Mon, Oct 07, 2019 at 01:01:17PM +0200, Christian Brauner wrote: > > When assiging and testing taskstats in taskstats_exit() there's a race > > when writing and reading sig->stats when a thread-group with more than > > one thread

Re: [PATCH v2] taskstats: fix data-race

2019-10-07 Thread Andrea Parri
On Mon, Oct 07, 2019 at 01:01:17PM +0200, Christian Brauner wrote: > When assiging and testing taskstats in taskstats_exit() there's a race > when writing and reading sig->stats when a thread-group with more than > one thread exits: > > cpu0: > thread catches fatal signal and whole thread-group

[PATCH v2] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
When assiging and testing taskstats in taskstats_exit() there's a race when writing and reading sig->stats when a thread-group with more than one thread exits: cpu0: thread catches fatal signal and whole thread-group gets taken down do_exit() do_group_exit() taskstats_exit()