linux/arch/sh/kernel
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
..
cpu signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL) 2021-10-25 15:56:29 -05:00
syscalls Merge branch 'akpm' (patches from Andrew) 2021-09-03 10:08:28 -07:00
vsyscall mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c
crash_dump.c
debugtraps.S
disassemble.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dma-coherent.c dma-mapping: merge <linux/dma-noncoherent.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:06 +02:00
dumpstack.c sh: stacktrace: Remove stacktrace_ops.stack() 2020-08-14 22:05:11 -04:00
dwarf.c
entry-common.S sh: fix syscall tracing 2020-09-13 21:22:55 -04:00
ftrace.c tracing: Fix various typos in comments 2021-03-23 14:08:18 -04:00
head_32.S
hw_breakpoint.c sh: kernel: hw_breakpoint: Fix missing break in switch statement 2019-08-11 16:15:16 -05:00
idle.c sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
io_trapped.c sh: unexport register_trapped_io and match_trapped_io_handler 2020-08-14 22:05:16 -04:00
io.c
iomap.c iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
ioport.c sh: don't include <asm/io_trapped.h> in <asm/io.h> 2020-08-14 22:05:16 -04:00
irq_32.c
irq.c softirq: Move do_softirq_own_stack() to generic asm header 2021-02-10 23:34:16 +01:00
kdebugfs.c sh: no need to check return value of debugfs_create functions 2019-06-03 15:39:40 +02:00
kgdb.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
kprobes.c kprobes: Do not increment probe miss count in the fault handler 2021-06-03 15:47:26 +02:00
machine_kexec.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
machvec.c Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
Makefile sh: remove -Werror from Makefiles 2020-08-14 22:05:13 -04:00
module.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
nmi_debug.c
perf_callchain.c sh: stacktrace: Remove stacktrace_ops.stack() 2020-08-14 22:05:11 -04:00
perf_event.c sh: Get rid of oprofile leftovers 2021-04-22 13:32:39 +01:00
process_32.c sched: Introduce task_is_running() 2021-06-18 11:43:07 +02:00
process.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
ptrace_32.c sh: fix syscall tracing 2020-09-13 21:22:55 -04:00
ptrace.c
reboot.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
relocate_kernel.S
return_address.c
setup.c sh: convert to setup_initial_init_mm() 2021-07-08 11:48:21 -07:00
sh_bios.c
sh_ksyms_32.c sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx 2020-06-01 14:48:49 -04:00
signal_32.c sh: add support for TIF_NOTIFY_SIGNAL 2020-11-09 08:16:55 -07:00
smp.c sched/core: Initialize the idle task with preemption disabled 2021-05-12 13:01:45 +02:00
stacktrace.c sh: stacktrace: Remove stacktrace_ops.stack() 2020-08-14 22:05:11 -04:00
swsusp.c
sys_sh32.c
sys_sh.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
syscalls_32.S
time.c sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
topology.c mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
traps_32.c uaccess: add force_uaccess_{begin,end} helpers 2020-08-12 10:57:59 -07:00
traps.c exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
unwinder.c
vmlinux.lds.S vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG 2020-09-01 09:50:35 +02:00