linux-stable/arch/nios2/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
..
.gitignore nios2: add .gitignore entries for auto-generated files 2017-05-08 16:59:19 +08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
asm-offsets.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
cpuinfo.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
entry.S nios2: add force_successful_syscall_return() 2022-08-25 11:18:28 +02:00
head.S
insnemu.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
kgdb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
misaligned.c nios2: remove unused statistic counters 2015-09-08 01:32:34 +08:00
module.c module: remove mod arg from module_free, rename module_memfree(). 2015-01-20 11:38:33 +10:30
nios2_ksyms.c nios2: ksyms: Add missing symbol exports 2019-03-07 05:29:35 +08:00
process.c sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
prom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
ptrace.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
setup.c nios2: force the string buffer NULL-terminated 2019-09-20 14:55:57 +08:00
signal.c nios2: restarts apply only to the first sigframe we build... 2022-08-25 11:18:28 +02:00
sys_nios2.c
syscall_table.c nios2: don't leave NULLs in sys_call_table[] 2022-08-25 11:18:27 +02:00
time.c nios2: Convert to using %pOFn instead of device_node.name 2018-09-28 16:39:27 -05:00
traps.c exit: Add and use make_task_dead. 2023-02-06 07:52:49 +01:00
vmlinux.lds.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00