Merge tag 'io_uring-5.8-2020-07-05' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / kernel / fork.c
index 142b236..efc5493 100644 (file)
@@ -1977,7 +1977,7 @@ static __latent_entropy struct task_struct *copy_process(
         * to stop root fork bombs.
         */
        retval = -EAGAIN;
-       if (nr_threads >= max_threads)
+       if (data_race(nr_threads >= max_threads))
                goto bad_fork_cleanup_count;
 
        delayacct_tsk_init(p);  /* Must remain after dup_task_struct() */