]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/fork.c
core: Fix user return notifier on fork()
[mirror_ubuntu-bionic-kernel.git] / kernel / fork.c
index 266c6af6ef1b089a1c64ee96428bd153db39217c..1b7512d5a64a88fb76908251e38104f13008f72c 100644 (file)
@@ -64,6 +64,7 @@
 #include <linux/magic.h>
 #include <linux/perf_event.h>
 #include <linux/posix-timers.h>
+#include <linux/user-return-notifier.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
@@ -249,6 +250,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
                goto out;
 
        setup_thread_stack(tsk, orig);
+       clear_user_return_notifier(tsk);
        stackend = end_of_stack(tsk);
        *stackend = STACK_END_MAGIC;    /* for overflow detection */