Merge tag 'acpi-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-microblaze.git] / kernel / fork.c
index 2877214..90c85b1 100644 (file)
@@ -1965,6 +1965,18 @@ static void copy_oom_score_adj(u64 clone_flags, struct task_struct *tsk)
        mutex_unlock(&oom_adj_mutex);
 }
 
+#ifdef CONFIG_RV
+static void rv_task_fork(struct task_struct *p)
+{
+       int i;
+
+       for (i = 0; i < RV_PER_TASK_MONITORS; i++)
+               p->rv[i].da_mon.monitoring = false;
+}
+#else
+#define rv_task_fork(p) do {} while (0)
+#endif
+
 /*
  * This creates a new process as a copy of the old one,
  * but does not actually start it yet.
@@ -2403,6 +2415,8 @@ static __latent_entropy struct task_struct *copy_process(
         */
        copy_seccomp(p);
 
+       rv_task_fork(p);
+
        rseq_fork(p, clone_flags);
 
        /* Don't start children in a dying pid namespace */