#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/sched/autogroup.h>
#include <linux/sched/mm.h>
#include <linux/sched/stat.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/sched/cputime.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/capability.h>
#include <linux/completion.h>
#include <linux/personality.h>
#include <linux/tty.h>
#include <linux/iocontext.h>
#include <linux/key.h>
#include <linux/cpu.h>
#include <linux/acct.h>
#include <linux/tsacct_kern.h>
#include <linux/file.h>
#include <linux/fdtable.h>
#include <linux/freezer.h>
#include <linux/binfmts.h>
#include <linux/nsproxy.h>
#include <linux/pid_namespace.h>
#include <linux/ptrace.h>
#include <linux/profile.h>
#include <linux/mount.h>
#include <linux/proc_fs.h>
#include <linux/kthread.h>
#include <linux/mempolicy.h>
#include <linux/taskstats_kern.h>
#include <linux/delayacct.h>
#include <linux/cgroup.h>
#include <linux/syscalls.h>
#include <linux/signal.h>
#include <linux/posix-timers.h>
#include <linux/cn_proc.h>
#include <linux/mutex.h>
#include <linux/futex.h>
#include <linux/pipe_fs_i.h>
#include <linux/audit.h>
#include <linux/resource.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/blkdev.h>
#include <linux/task_work.h>
#include <linux/fs_struct.h>
#include <linux/init_task.h>
#include <linux/perf_event.h>
#include <trace/events/sched.h>
#include <linux/hw_breakpoint.h>
#include <linux/oom.h>
#include <linux/writeback.h>
#include <linux/shm.h>
#include <linux/kcov.h>
#include <linux/kmsan.h>
#include <linux/random.h>
#include <linux/rcuwait.h>
#include <linux/compat.h>
#include <linux/io_uring.h>
#include <linux/kprobes.h>
#include <linux/rethook.h>
#include <linux/sysfs.h>
#include <linux/user_events.h>
#include <linux/uaccess.h>
#include <uapi/linux/wait.h>
#include <asm/unistd.h>
#include <asm/mmu_context.h>
#include "exit.h"
static unsigned int oops_limit = …;
#ifdef CONFIG_SYSCTL
static struct ctl_table kern_exit_table[] = …;
static __init int kernel_exit_sysctls_init(void)
{ … }
late_initcall(kernel_exit_sysctls_init);
#endif
static atomic_t oops_count = …;
#ifdef CONFIG_SYSFS
static ssize_t oops_count_show(struct kobject *kobj, struct kobj_attribute *attr,
char *page)
{ … }
static struct kobj_attribute oops_count_attr = …;
static __init int kernel_exit_sysfs_init(void)
{ … }
late_initcall(kernel_exit_sysfs_init);
#endif
static void __unhash_process(struct task_struct *p, bool group_dead)
{ … }
static void __exit_signal(struct task_struct *tsk)
{ … }
static void delayed_put_task_struct(struct rcu_head *rhp)
{ … }
void put_task_struct_rcu_user(struct task_struct *task)
{ … }
void __weak release_thread(struct task_struct *dead_task)
{ … }
void release_task(struct task_struct *p)
{ … }
int rcuwait_wake_up(struct rcuwait *w)
{ … }
EXPORT_SYMBOL_GPL(…);
static int will_become_orphaned_pgrp(struct pid *pgrp,
struct task_struct *ignored_task)
{ … }
int is_current_pgrp_orphaned(void)
{ … }
static bool has_stopped_jobs(struct pid *pgrp)
{ … }
static void
kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)
{ … }
static void coredump_task_exit(struct task_struct *tsk)
{ … }
#ifdef CONFIG_MEMCG
static bool __try_to_set_owner(struct task_struct *tsk, struct mm_struct *mm)
{ … }
static bool try_to_set_owner(struct task_struct *g, struct mm_struct *mm)
{ … }
void mm_update_next_owner(struct mm_struct *mm)
{ … }
#endif
static void exit_mm(void)
{ … }
static struct task_struct *find_alive_thread(struct task_struct *p)
{ … }
static struct task_struct *find_child_reaper(struct task_struct *father,
struct list_head *dead)
__releases(&tasklist_lock)
__acquires(&tasklist_lock)
{ … }
static struct task_struct *find_new_reaper(struct task_struct *father,
struct task_struct *child_reaper)
{ … }
static void reparent_leader(struct task_struct *father, struct task_struct *p,
struct list_head *dead)
{ … }
static void forget_original_parent(struct task_struct *father,
struct list_head *dead)
{ … }
static void exit_notify(struct task_struct *tsk, int group_dead)
{ … }
#ifdef CONFIG_DEBUG_STACK_USAGE
static void check_stack_usage(void)
{ … }
#else
static inline void check_stack_usage(void) {}
#endif
static void synchronize_group_exit(struct task_struct *tsk, long code)
{ … }
void __noreturn do_exit(long code)
{ … }
void __noreturn make_task_dead(int signr)
{ … }
SYSCALL_DEFINE1(exit, int, error_code)
{ … }
void __noreturn
do_group_exit(int exit_code)
{ … }
SYSCALL_DEFINE1(exit_group, int, error_code)
{ … }
static int eligible_pid(struct wait_opts *wo, struct task_struct *p)
{ … }
static int
eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p)
{ … }
static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
{ … }
static int *task_stopped_code(struct task_struct *p, bool ptrace)
{ … }
static int wait_task_stopped(struct wait_opts *wo,
int ptrace, struct task_struct *p)
{ … }
static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
{ … }
static int wait_consider_task(struct wait_opts *wo, int ptrace,
struct task_struct *p)
{ … }
static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
{ … }
static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
{ … }
bool pid_child_should_wake(struct wait_opts *wo, struct task_struct *p)
{ … }
static int child_wait_callback(wait_queue_entry_t *wait, unsigned mode,
int sync, void *key)
{ … }
void __wake_up_parent(struct task_struct *p, struct task_struct *parent)
{ … }
static bool is_effectively_child(struct wait_opts *wo, bool ptrace,
struct task_struct *target)
{ … }
static int do_wait_pid(struct wait_opts *wo)
{ … }
long __do_wait(struct wait_opts *wo)
{ … }
static long do_wait(struct wait_opts *wo)
{ … }
int kernel_waitid_prepare(struct wait_opts *wo, int which, pid_t upid,
struct waitid_info *infop, int options,
struct rusage *ru)
{ … }
static long kernel_waitid(int which, pid_t upid, struct waitid_info *infop,
int options, struct rusage *ru)
{ … }
SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
infop, int, options, struct rusage __user *, ru)
{ … }
long kernel_wait4(pid_t upid, int __user *stat_addr, int options,
struct rusage *ru)
{ … }
int kernel_wait(pid_t pid, int *stat)
{ … }
SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
int, options, struct rusage __user *, ru)
{ … }
#ifdef __ARCH_WANT_SYS_WAITPID
SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options)
{ … }
#endif
#ifdef CONFIG_COMPAT
COMPAT_SYSCALL_DEFINE4(wait4,
compat_pid_t, pid,
compat_uint_t __user *, stat_addr,
int, options,
struct compat_rusage __user *, ru)
{ … }
COMPAT_SYSCALL_DEFINE5(waitid,
int, which, compat_pid_t, pid,
struct compat_siginfo __user *, infop, int, options,
struct compat_rusage __user *, uru)
{ … }
#endif
__weak __function_aligned void abort(void)
{ … }
EXPORT_SYMBOL(…);