]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - kernel/fork.c
fork: Unconditionally exit if a fatal signal is pending
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 23 Jul 2018 13:01:10 +0000 (08:01 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 23 Jul 2018 13:01:10 +0000 (08:01 -0500)
commit7673bf553b2732a00f7644fb2adadda69389ab37
treec96f3bc7e547066a6f5f1e09cfb4c6b393836adb
parent4ca1d3ee46130e9b939c02a93e3970dad151fed6
fork: Unconditionally exit if a fatal signal is pending

In practice this does not change anything as testing for fatal_signal_pending
and exiting for with an error code duplicates the work of the next clause
which recalculates pending signals and then exits fork if any are pending.
In both cases the pending signal will trigger the slow path when existing
to userspace, and the fatal signal will cause do_exit to be called.

The advantage of making this a separate test is that it makes it clear
processing the fatal signal will terminate the fork, and it allows the
rest of the signal logic to be updated without fear that this important
case will be lost.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/fork.c