linux/arch/sh/kernel/cpu
Eric W. Biederman ce0ee4e6ac signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL)
Today the sh code allocates memory the first time a process uses
the fpu.  If that memory allocation fails, kill the affected task
with force_sig(SIGKILL) rather than do_group_exit(SIGKILL).

Calling do_group_exit from an exception handler can potentially lead
to dead locks as do_group_exit is not designed to be called from
interrupt context.  Instead use force_sig(SIGKILL) to kill the
userspace process.  Sending signals in general and force_sig in
particular has been tested from interrupt context so there should be
no problems.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Fixes: 0ea820cf9b ("sh: Move over to dynamically allocated FPU context.")
Link: https://lkml.kernel.org/r/20211020174406.17889-6-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2021-10-25 15:56:29 -05:00
..
irq sh: remove sh5 support 2020-06-01 14:48:52 -04:00
sh2 remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
sh2a sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
sh3 arch: sh: remove duplicate include 2021-01-06 19:55:27 -05:00
sh4 mm: remove __get_vm_area 2020-06-02 10:59:10 -07:00
sh4a sh: sh4a: Bring back tmu3_device early device 2020-06-01 14:48:46 -04:00
shmobile cpuidle: Drop disabled field from struct cpuidle_state 2019-11-29 11:48:39 +01:00
adc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
clock-cpg.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
clock.c sh: cpu: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
fpu.c signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL) 2021-10-25 15:56:29 -05:00
init.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
Makefile sh: remove sh5 support 2020-06-01 14:48:52 -04:00
pfc.c sh: cpu: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
proc.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00