X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Ffork.c;h=afa2947286cd84e3f311780cfd0116dcf7edc90e;hb=2b95bd7d58d368fe5dcbe6f4e494847ea082d89d;hp=7332448b668a28ec33cece043e043de8a981650a;hpb=f7ccbae45c5e2c1077654b0e857e7efb1aa31c92;p=karo-tx-linux.git diff --git a/kernel/fork.c b/kernel/fork.c index 7332448b668a..afa2947286cd 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -15,6 +15,13 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -1458,6 +1465,21 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) task->pids[type].pid = pid; } +static inline void rcu_copy_process(struct task_struct *p) +{ +#ifdef CONFIG_PREEMPT_RCU + p->rcu_read_lock_nesting = 0; + p->rcu_read_unlock_special.s = 0; + p->rcu_blocked_node = NULL; + INIT_LIST_HEAD(&p->rcu_node_entry); +#endif /* #ifdef CONFIG_PREEMPT_RCU */ +#ifdef CONFIG_TASKS_RCU + p->rcu_tasks_holdout = false; + INIT_LIST_HEAD(&p->rcu_tasks_holdout_list); + p->rcu_tasks_idle_cpu = -1; +#endif /* #ifdef CONFIG_TASKS_RCU */ +} + /* * This creates a new process as a copy of the old one, * but does not actually start it yet. @@ -2330,6 +2352,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags) } } + perf_event_namespaces(current); + bad_unshare_cleanup_cred: if (new_cred) put_cred(new_cred);