]> git.baikalelectronics.ru Git - kernel.git/commit
signal/x86: In emulate_vsyscall force a signal instead of calling do_exit
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 20 Oct 2021 17:44:03 +0000 (12:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 08:49:06 +0000 (09:49 +0100)
commitd3db8dfb3627348f09dccd2e5c33437ad304afd9
tree595b96d67ccb60ea31bc1ad7633a03ad7f2e45cd
parente0c7f00f69507dff55cb1b9ca07adbe50f4b495e
signal/x86: In emulate_vsyscall force a signal instead of calling do_exit

commit 5b7571181958b04629e54096d6ac5754bef0f66e upstream.

Directly calling do_exit with a signal number has the problem that
all of the side effects of the signal don't happen, such as
killing all of the threads of a process instead of just the
calling thread.

So replace do_exit(SIGSYS) with force_fatal_sig(SIGSYS) which
causes the signal handling to take it's normal path and work
as expected.

Cc: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20211020174406.17889-17-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Thomas Backlund <tmb@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/vsyscall/vsyscall_64.c