linux/arch
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
..
alpha Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
arc Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
arm ARM development updates for 5.15: 2021-09-09 13:25:49 -07:00
arm64 Merge branch 'linus' into smp/urgent 2021-09-11 00:38:47 +02:00
csky Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
m68k Merge branch 'akpm' (patches from Andrew) 2021-09-03 10:08:28 -07:00
microblaze Microblaze patches for 5.15-rc1 2021-09-08 16:02:13 -07:00
mips signal/mips: Update (_save|_restore)_fp_context to fail with -EFAULT 2021-10-25 15:55:35 -05:00
nds32 exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
nios2 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
openrisc exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
parisc parisc: Implement __get/put_kernel_nofault() 2021-09-09 22:53:09 +02:00
powerpc arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
riscv Updates for the SMP and CPU hotplug: 2021-09-12 12:42:51 -07:00
s390 exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
sh signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL) 2021-10-25 15:56:29 -05:00
sparc signal/sparc32: Remove unreachable do_exit in do_sparc_fault 2021-10-20 13:09:56 -05:00
um This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
x86 exit/doublefault: Remove apparently bogus comment about rewind_stack_do_exit 2021-10-20 13:09:43 -05:00
xtensa exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
.gitignore
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00