Commit 9a603e65 authored by Eddy Wu's avatar Eddy Wu Committed by Yang Yingliang
Browse files

fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent



stable inclusion
from linux-4.19.156
commit b177d2d915cea2d0a590f0034a20299dd1ee3ef2

--------------------------------

commit b4e00444 upstream.

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.

Signed-off-by: default avatarEddy Wu <eddy_wu@trendmicro.com>
Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent d45626c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment