* Re: [PATCH] fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
[not found] ` <CAHk-=whjyOuO-xwov7UWidBOkWyZv84TVA18hBb01V-hiML+yg@mail.gmail.com>
@ 2020-11-08 19:56 ` Linus Torvalds
2020-11-09 10:20 ` Greg KH
2020-11-09 11:44 ` Oleg Nesterov
0 siblings, 2 replies; 3+ messages in thread
From: Linus Torvalds @ 2020-11-08 19:56 UTC (permalink / raw)
To: stable; +Cc: Oleg Nesterov
.. oh, and I suspect it should have been marked for stable.
I added Oleg's ack (implicit in an earlier thread), but didn't add a stable tag.
It's commit b4e00444cab4 ("fork: fix copy_process(CLONE_PARENT) race
with the exiting ->real_parent") in my tree.
I'm not sure how serious it is. Yeah, the race can cause the wrong
exit signal in theory, but I think you almost have to do it with
cooperating processes, at which point you could have just done it
intentionally in the first place.
But it does look like a real data race, and the fix looks small and
obvious enough that I think it's stable material.
Oleg?
Linus
On Sun, Nov 8, 2020 at 11:19 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Fri, Nov 6, 2020 at 10:47 PM Eddy Wu <itseddy0402@gmail.com> wrote:
> >
> > current->group_leader->exit_signal may change during copy_process() if
> > current->real_parent exits, move the assignment inside tasklist_lock to avoid
> > the race.
>
> Applied. Thanks,
>
> Linus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
2020-11-08 19:56 ` [PATCH] fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent Linus Torvalds
@ 2020-11-09 10:20 ` Greg KH
2020-11-09 11:44 ` Oleg Nesterov
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-11-09 10:20 UTC (permalink / raw)
To: Linus Torvalds; +Cc: stable, Oleg Nesterov
On Sun, Nov 08, 2020 at 11:56:48AM -0800, Linus Torvalds wrote:
> .. oh, and I suspect it should have been marked for stable.
>
> I added Oleg's ack (implicit in an earlier thread), but didn't add a stable tag.
>
> It's commit b4e00444cab4 ("fork: fix copy_process(CLONE_PARENT) race
> with the exiting ->real_parent") in my tree.
>
> I'm not sure how serious it is. Yeah, the race can cause the wrong
> exit signal in theory, but I think you almost have to do it with
> cooperating processes, at which point you could have just done it
> intentionally in the first place.
>
> But it does look like a real data race, and the fix looks small and
> obvious enough that I think it's stable material.
Now queued up to stable trees, thanks!
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
2020-11-08 19:56 ` [PATCH] fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent Linus Torvalds
2020-11-09 10:20 ` Greg KH
@ 2020-11-09 11:44 ` Oleg Nesterov
1 sibling, 0 replies; 3+ messages in thread
From: Oleg Nesterov @ 2020-11-09 11:44 UTC (permalink / raw)
To: Linus Torvalds; +Cc: stable
On 11/08, Linus Torvalds wrote:
>
> But it does look like a real data race, and the fix looks small and
> obvious enough that I think it's stable material.
Agreed, the patch looks fine for -stable. I don't think that
cgroup_can_fork() could ever use thread_group_leader() or anything
else which checks ->exit_code...
And I see that Greg has already sent the patches with the correct
modifications for the case when we need "clone_flags & CSIGNAL"
rather than args->exit_signal.
Thanks Greg,
Oleg.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-09 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20201107064722.GA139215@arch-e3.localdomain>
[not found] ` <CAHk-=whjyOuO-xwov7UWidBOkWyZv84TVA18hBb01V-hiML+yg@mail.gmail.com>
2020-11-08 19:56 ` [PATCH] fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent Linus Torvalds
2020-11-09 10:20 ` Greg KH
2020-11-09 11:44 ` Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox