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 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
asm-offsets.c nds32: Assembly macros and definitions 2018-02-22 10:44:31 +08:00
atl2c.c nds32: add NULL entry to the end of_device_id array 2018-09-04 14:45:15 +08:00
cacheinfo.c nds32: fix semicolon code style issue 2019-05-07 17:52:10 +08:00
devtree.c nds32: Device tree support 2018-02-22 10:44:34 +08:00
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 nds32: nds32 FPU port 2018-11-22 18:13:13 +08:00
ex-exit.S nds32: add support for TIF_NOTIFY_SIGNAL 2020-12-12 09:17:38 -07:00
ex-scall.S nds32: nds32 FPU port 2018-11-22 18:13:13 +08:00
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 nds32: IRQ handling 2018-02-22 10:44:32 +08:00
module.c mm: introduce include/linux/pgtable.h 2020-06-09 09:39:13 -07:00
nds32_ksyms.c nds32: don't export low-level cache flushing routines 2019-05-16 14:40:26 +08:00
perf_event_cpu.c perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
pm.c nds32: use pgtable-nopmd instead of 4level-fixup 2019-12-04 19:44:15 -08:00
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 nds32: nds32 FPU port 2018-11-22 18:13:13 +08:00
stacktrace.c nds32: Add macro definition for offset of lp register on stack 2018-09-04 14:45:19 +08:00
sys_nds32.c nds32: Avoid IEX status being incorrectly modified 2019-05-31 15:23:26 +08:00
syscall_table.c nds32: System calls handling 2018-02-22 10:44:33 +08:00
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