Merge tag 'for-5.13/io_uring-2021-04-27' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / kernel / fork.c
index 224c831..0f1992d 100644 (file)
@@ -2010,6 +2010,7 @@ static __latent_entropy struct task_struct *copy_process(
        spin_lock_init(&p->alloc_lock);
 
        init_sigpending(&p->pending);
+       p->sigqueue_cache = NULL;
 
        p->utime = p->stime = p->gtime = 0;
 #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
@@ -2085,7 +2086,7 @@ static __latent_entropy struct task_struct *copy_process(
        if (retval)
                goto bad_fork_cleanup_policy;
 
-       retval = perf_event_init_task(p);
+       retval = perf_event_init_task(p, clone_flags);
        if (retval)
                goto bad_fork_cleanup_policy;
        retval = audit_alloc(p);