Re: [PATCH] taskstats: fix data-race

2019-10-09 Thread Christian Brauner
On Wed, Oct 09, 2019 at 01:48:27PM +0200, Marco Elver wrote: > On Wed, 9 Oct 2019 at 13:31, 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] taskstats: fix data-race

2019-10-09 Thread Marco Elver
On Wed, 9 Oct 2019 at 13:31, 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 gets taken

Re: [PATCH] taskstats: fix data-race

2019-10-09 Thread Christian Brauner
On Wed, Oct 09, 2019 at 01:31:34PM +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] taskstats: fix data-race

2019-10-09 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()

Re: [PATCH] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
On Mon, Oct 07, 2019 at 12:40:39PM +0200, Andrea Parri wrote: > Hi Christian, > > On Mon, Oct 07, 2019 at 01:52:16AM +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

Re: [PATCH] taskstats: fix data-race

2019-10-07 Thread Andrea Parri
Hi Christian, On Mon, Oct 07, 2019 at 01:52:16AM +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

Re: [PATCH] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
On Mon, Oct 07, 2019 at 09:31:16AM +0200, Dmitry Vyukov wrote: > On Mon, Oct 7, 2019 at 1:52 AM 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] taskstats: fix data-race

2019-10-07 Thread Dmitry Vyukov
On Mon, Oct 7, 2019 at 1:52 AM 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 gets taken

[PATCH] taskstats: fix data-race

2019-10-06 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()

Re: [PATCH] taskstats: fix data-race

2019-10-06 Thread Christian Brauner
On Sun, Oct 06, 2019 at 12:00:32PM +0200, Dmitry Vyukov wrote: > On Sat, Oct 5, 2019 at 1:28 PM Christian Brauner > wrote: > > > > When assiging and testing taskstats in taskstats > > taskstats_exit() there's a race around writing and reading sig->stats. > > > > cpu0: > > task calls exit() > >

Re: [PATCH] taskstats: fix data-race

2019-10-06 Thread Dmitry Vyukov
On Sat, Oct 5, 2019 at 1:28 PM Christian Brauner wrote: > > When assiging and testing taskstats in taskstats > taskstats_exit() there's a race around writing and reading sig->stats. > > cpu0: > task calls exit() > do_exit() > -> taskstats_exit() > -> taskstats_tgid_alloc()

Re: [PATCH] taskstats: fix data-race

2019-10-05 Thread Marco Elver
On Sat, 5 Oct 2019 at 16:15, Christian Brauner wrote: > > On Sat, Oct 05, 2019 at 03:33:07PM +0200, Marco Elver wrote: > > On Sat, 5 Oct 2019 at 13:28, Christian Brauner > > wrote: > > > > > > When assiging and testing taskstats in taskstats > > > taskstats_exit() there's a race around writing

Re: [PATCH] taskstats: fix data-race

2019-10-05 Thread Christian Brauner
On Sat, Oct 05, 2019 at 03:33:07PM +0200, Marco Elver wrote: > On Sat, 5 Oct 2019 at 13:28, Christian Brauner > wrote: > > > > When assiging and testing taskstats in taskstats > > taskstats_exit() there's a race around writing and reading sig->stats. > > > > cpu0: > > task calls exit() > >

Re: [PATCH] taskstats: fix data-race

2019-10-05 Thread Marco Elver
On Sat, 5 Oct 2019 at 13:28, Christian Brauner wrote: > > When assiging and testing taskstats in taskstats > taskstats_exit() there's a race around writing and reading sig->stats. > > cpu0: > task calls exit() > do_exit() > -> taskstats_exit() > -> taskstats_tgid_alloc() >

[PATCH] taskstats: fix data-race

2019-10-05 Thread Christian Brauner
When assiging and testing taskstats in taskstats taskstats_exit() there's a race around writing and reading sig->stats. cpu0: task calls exit() do_exit() -> taskstats_exit() -> taskstats_tgid_alloc() The task takes sighand lock and assigns new stats to sig->stats. cpu1: