fork.c (cdd38c5f1ce4398ec58fec95904b75824daab7b5) fork.c (a10787e6d58c24b51e91c19c6d16c5da89fcaa4b)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/kernel/fork.c
4 *
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 */
7
8/*

--- 82 unchanged lines hidden (view full) ---

91#include <linux/sysctl.h>
92#include <linux/kcov.h>
93#include <linux/livepatch.h>
94#include <linux/thread_info.h>
95#include <linux/stackleak.h>
96#include <linux/kasan.h>
97#include <linux/scs.h>
98#include <linux/io_uring.h>
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/kernel/fork.c
4 *
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 */
7
8/*

--- 82 unchanged lines hidden (view full) ---

91#include <linux/sysctl.h>
92#include <linux/kcov.h>
93#include <linux/livepatch.h>
94#include <linux/thread_info.h>
95#include <linux/stackleak.h>
96#include <linux/kasan.h>
97#include <linux/scs.h>
98#include <linux/io_uring.h>
99#include <linux/bpf.h>
99
100#include <asm/pgalloc.h>
101#include <linux/uaccess.h>
102#include <asm/mmu_context.h>
103#include <asm/cacheflush.h>
104#include <asm/tlbflush.h>
105
106#include <trace/events/sched.h>

--- 622 unchanged lines hidden (view full) ---

729 WARN_ON(!tsk->exit_state);
730 WARN_ON(refcount_read(&tsk->usage));
731 WARN_ON(tsk == current);
732
733 io_uring_free(tsk);
734 cgroup_free(tsk);
735 task_numa_free(tsk, true);
736 security_task_free(tsk);
100
101#include <asm/pgalloc.h>
102#include <linux/uaccess.h>
103#include <asm/mmu_context.h>
104#include <asm/cacheflush.h>
105#include <asm/tlbflush.h>
106
107#include <trace/events/sched.h>

--- 622 unchanged lines hidden (view full) ---

730 WARN_ON(!tsk->exit_state);
731 WARN_ON(refcount_read(&tsk->usage));
732 WARN_ON(tsk == current);
733
734 io_uring_free(tsk);
735 cgroup_free(tsk);
736 task_numa_free(tsk, true);
737 security_task_free(tsk);
738 bpf_task_storage_free(tsk);
737 exit_creds(tsk);
738 delayacct_tsk_free(tsk);
739 put_signal_struct(tsk->signal);
740
741 if (!profile_handoff_task(tsk))
742 free_task(tsk);
743}
744EXPORT_SYMBOL_GPL(__put_task_struct);

--- 1312 unchanged lines hidden (view full) ---

2057
2058#ifdef CONFIG_DEBUG_MUTEXES
2059 p->blocked_on = NULL; /* not blocked yet */
2060#endif
2061#ifdef CONFIG_BCACHE
2062 p->sequential_io = 0;
2063 p->sequential_io_avg = 0;
2064#endif
739 exit_creds(tsk);
740 delayacct_tsk_free(tsk);
741 put_signal_struct(tsk->signal);
742
743 if (!profile_handoff_task(tsk))
744 free_task(tsk);
745}
746EXPORT_SYMBOL_GPL(__put_task_struct);

--- 1312 unchanged lines hidden (view full) ---

2059
2060#ifdef CONFIG_DEBUG_MUTEXES
2061 p->blocked_on = NULL; /* not blocked yet */
2062#endif
2063#ifdef CONFIG_BCACHE
2064 p->sequential_io = 0;
2065 p->sequential_io_avg = 0;
2066#endif
2067#ifdef CONFIG_BPF_SYSCALL
2068 RCU_INIT_POINTER(p->bpf_storage, NULL);
2069#endif
2065
2066 /* Perform scheduler related setup. Assign this task to a CPU. */
2067 retval = sched_fork(clone_flags, p);
2068 if (retval)
2069 goto bad_fork_cleanup_policy;
2070
2071 retval = perf_event_init_task(p);
2072 if (retval)

--- 999 unchanged lines hidden ---
2070
2071 /* Perform scheduler related setup. Assign this task to a CPU. */
2072 retval = sched_fork(clone_flags, p);
2073 if (retval)
2074 goto bad_fork_cleanup_policy;
2075
2076 retval = perf_event_init_task(p);
2077 if (retval)

--- 999 unchanged lines hidden ---