WSL2-Linux-Kernel/arch/nds32/kernel
Eric W. Biederman 39a26d8721 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-01 08:27:20 +01:00
..
vdso arch: vdso: add vdso linker script to 'targets' instead of extra-y 2020-09-07 21:41:27 +09:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile
asm-offsets.c
atl2c.c
cacheinfo.c
devtree.c
dma.c dma-mapping: merge <linux/dma-noncoherent.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:06 +02:00
ex-entry.S
ex-exit.S nds32: add support for TIF_NOTIFY_SIGNAL 2020-12-12 09:17:38 -07:00
ex-scall.S
fpu.c exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
ftrace.c ftrace/nds32: Update the proto for ftrace_trace_function to match ftrace_stub 2021-10-27 13:00:17 -04:00
head.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
irq.c
module.c mm: introduce include/linux/pgtable.h 2020-06-09 09:39:13 -07:00
nds32_ksyms.c
perf_event_cpu.c perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
pm.c
process.c sched: Introduce task_is_running() 2021-06-18 11:43:07 +02:00
ptrace.c nds32: switch to ->regset_get() 2020-07-27 14:31:11 -04:00
setup.c nds32/setup: remove unused memblock_region variable in setup_memory() 2021-09-08 18:45:53 -07:00
signal.c nds32: add support for TIF_NOTIFY_SIGNAL 2020-12-12 09:17:38 -07:00
sleep.S
stacktrace.c
sys_nds32.c
syscall_table.c
time.c nds32: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2021-02-25 14:31:48 +08:00
traps.c exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
vdso.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
vmlinux.lds.S vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG 2020-09-01 09:50:35 +02:00