Merge branch 'move SYS() macro to test_progs.h and run mptcp in a dedicated netns'
[platform/kernel/linux-starfive.git] / kernel / fork.c
index 9f7fe35..038b898 100644 (file)
@@ -1044,7 +1044,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
 #endif
 
 #ifdef CONFIG_BLK_CGROUP
-       tsk->throttle_queue = NULL;
+       tsk->throttle_disk = NULL;
        tsk->use_memdelay = 0;
 #endif
 
@@ -1060,6 +1060,10 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
        tsk->reported_split_lock = 0;
 #endif
 
+#ifdef CONFIG_SCHED_MM_CID
+       tsk->mm_cid = -1;
+       tsk->mm_cid_active = 0;
+#endif
        return tsk;
 
 free_stack:
@@ -1169,6 +1173,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,
 
        mm->user_ns = get_user_ns(user_ns);
        lru_gen_init_mm(mm);
+       mm_init_cid(mm);
        return mm;
 
 fail_pcpu:
@@ -1601,6 +1606,7 @@ static int copy_mm(unsigned long clone_flags, struct task_struct *tsk)
 
        tsk->mm = mm;
        tsk->active_mm = mm;
+       sched_mm_cid_fork(tsk);
        return 0;
 }
 
@@ -3034,7 +3040,7 @@ void __init mm_cache_init(void)
         * dynamically sized based on the maximum CPU number this system
         * can have, taking hotplug into account (nr_cpu_ids).
         */
-       mm_size = sizeof(struct mm_struct) + cpumask_size();
+       mm_size = sizeof(struct mm_struct) + cpumask_size() + mm_cid_size();
 
        mm_cachep = kmem_cache_create_usercopy("mm_struct",
                        mm_size, ARCH_MIN_MMSTRUCT_ALIGN,