Commit 4ba40fa6 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Zheng Zengkai
Browse files

fix race between exit_itimers() and /proc/pid/timers

stable inclusion
from stable-v5.10.132
commit 91530f675e88c6b27306c35ca4e482fb956794d1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5YS3T

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=91530f675e88c6b27306c35ca4e482fb956794d1



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

commit d5b36a4d upstream.

As Chris explains, the comment above exit_itimers() is not correct,
we can race with proc_timers_seq_ops. Change exit_itimers() to clear
signal->posix_timers with ->siglock held.

Cc: <stable@vger.kernel.org>
Reported-by: default avatar <chris@accessvector.net>
Signed-off-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 avatarZheng Zengkai <zhengzengkai@huawei.com>

 Conflicts:
	fs/exec.c

Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 20c0231b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment