Commit b2d71b3c authored by Mark Rutland's avatar Mark Rutland Committed by Catalin Marinas

arm64: signal: don't force known signals to SIGKILL

Since commit:

  a7e6f1ca ("arm64: signal: Force SIGKILL for unknown signals in force_signal_inject")

... any signal which is not SIGKILL will be upgraded to a SIGKILL be
force_signal_inject(). This includes signals we do expect, such as
SIGILL triggered by do_undefinstr().

Fix the check to use a logical AND rather than a logical OR, permitting
signals whose layout is SIL_FAULT.

Fixes: a7e6f1ca ("arm64: signal: Force SIGKILL for unknown signals in force_signal_inject")
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 800cb2e5
...@@ -366,7 +366,7 @@ void force_signal_inject(int signal, int code, unsigned long address) ...@@ -366,7 +366,7 @@ void force_signal_inject(int signal, int code, unsigned long address)
} }
/* Force signals we don't understand to SIGKILL */ /* Force signals we don't understand to SIGKILL */
if (WARN_ON(signal != SIGKILL || if (WARN_ON(signal != SIGKILL &&
siginfo_layout(signal, code) != SIL_FAULT)) { siginfo_layout(signal, code) != SIL_FAULT)) {
signal = SIGKILL; signal = SIGKILL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment