linux-stable/arch/sh/kernel
Eric W. Biederman 9a18c9c833 exit: Add and use make_task_dead.
commit 0e25498f8c upstream.

There are two big uses of do_exit.  The first is it's design use to be
the guts of the exit(2) system call.  The second use is to terminate
a task after something catastrophic has happened like a NULL pointer
in kernel code.

Add a function make_task_dead that is initialy exactly the same as
do_exit to cover the cases where do_exit is called to handle
catastrophic failure.  In time this can probably be reduced to just a
light wrapper around do_task_dead. For now keep it exactly the same so
that there will be no behavioral differences introducing this new
concept.

Replace all of the uses of do_exit that use it for catastraphic
task cleanup with make_task_dead to make it clear what the code
is doing.

As part of this rename rewind_stack_do_exit
rewind_stack_and_make_dead.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-06 07:52:49 +01:00
..
cpu sh: check return code of request_irq 2021-11-26 10:47:16 +01:00
syscalls arch: mark syscall number 435 reserved for clone3 2019-07-15 00:39:33 +02:00
vsyscall sh: vsyscall: drop unnecessary cc-ldoption 2019-05-18 11:29:01 +09:00
.gitignore
Makefile sh: use generic dma_noncoherent_ops 2018-08-02 13:54:20 +02:00
asm-offsets.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crash_dump.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugtraps.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
disassemble.c sh: kernel: disassemble: Mark expected switch fall-throughs 2019-08-11 16:15:16 -05:00
dma-coherent.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
dumpstack.c Tracing changes for v4.21: 2018-12-31 11:46:59 -08:00
dwarf.c It appears that the zero-day bot did find a bug in my sh build. 2019-01-05 14:08:00 -08:00
entry-common.S sh: Fix validation of system call number 2020-08-05 09:59:46 +02:00
ftrace.c sh/function_graph: Simplify with function_graph_enter() 2018-11-27 20:31:39 -05:00
head_32.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
head_64.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
hw_breakpoint.c sh: kernel: hw_breakpoint: Fix missing break in switch statement 2019-08-11 16:15:16 -05:00
idle.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
io.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
io_trapped.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
iomap.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
ioport.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
irq.c softirq/sh: Use nmi_count() on /proc/interrupts print out 2018-05-14 11:25:27 +02:00
irq_32.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
irq_64.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
kdebugfs.c sh: no need to check return value of debugfs_create functions 2019-06-03 15:39:40 +02:00
kgdb.c kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
kprobes.c arch/sh: Check for kprobe trap number before trying to handle a kprobe trap 2019-06-26 19:11:13 +09:00
machine_kexec.c memblock: drop __memblock_alloc_base() 2019-03-12 10:04:01 -07:00
machvec.c sh: machvec: Use char[] for section boundaries 2022-10-26 13:22:21 +02:00
module.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
nmi_debug.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
perf_callchain.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
perf_event.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
process.c Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
process_32.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
process_64.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
ptrace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ptrace_32.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
ptrace_64.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
reboot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
relocate_kernel.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
return_address.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
setup.c vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled 2018-12-20 16:32:56 +00:00
sh_bios.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
sh_ksyms_32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sh_ksyms_64.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
signal_32.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
signal_64.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
smp.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
stacktrace.c sh/stacktrace: Remove the pointless ULONG_MAX marker 2019-04-14 19:58:28 +02:00
swsusp.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
sys_sh.c mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() 2018-04-02 20:16:11 +02:00
sys_sh32.c mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() 2018-04-02 20:16:10 +02:00
syscalls_32.S sh: remove nargs from __SYSCALL 2019-03-05 21:07:13 -08:00
syscalls_64.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
time.c Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08:00
topology.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
traps.c exit: Add and use make_task_dead. 2023-02-06 07:52:49 +01:00
traps_32.c signal: Remove the task parameter from force_sig_fault 2019-05-29 09:31:43 -05:00
traps_64.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
unwinder.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
vmlinux.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00