mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
signal: Have prepare_signal detect coredumps using signal->core_state
In preparation for removing the flag SIGNAL_GROUP_COREDUMP, change prepare_signal to test signal->core_state instead of the flag SIGNAL_GROUP_COREDUMP. Both fields are protected by siglock and both live in signal_struct so there are no real tradeoffs here, just a change to which field is being tested. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: "Eric W. Biederman" <[email protected]>
This commit is contained in:
1 parent
98b24b16b2
commit
a0287db0f1
1 file changed
+2
-2
+2
-2
@@ -906,8 +906,8 @@ static bool prepare_signal(int sig, struct task_struct *p, bool force)
|
||||
struct task_struct *t;
|
||||
sigset_t flush;
|
||||
|
||||
if (signal->flags & (SIGNAL_GROUP_EXIT | SIGNAL_GROUP_COREDUMP)) {
|
||||
if (!(signal->flags & SIGNAL_GROUP_EXIT))
|
||||
if ((signal->flags & SIGNAL_GROUP_EXIT) || signal->core_state) {
|
||||
if (signal->core_state)
|
||||
return sig == SIGKILL;
|
||||
/*
|
||||
* The process is in the middle of dying, nothing to do.
|
||||
|
||||
Reference in new issue
Block a user