.. 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
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
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.
linux-stable-mirror@lists.linaro.org