--- a/fs/exec.c
+++ b/fs/exec.c
-@@ -1013,6 +1013,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1014,6 +1014,7 @@ static int exec_mmap(struct mm_struct *m
active_mm = tsk->active_mm;
tsk->active_mm = mm;
tsk->mm = mm;
/*
* This prevents preemption while active_mm is being loaded and
* it and mm are being updated, which could cause problems for
-@@ -1028,6 +1029,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1029,6 +1030,7 @@ static int exec_mmap(struct mm_struct *m
tsk->mm->vmacache_seqnum = 0;
vmacache_flush(tsk);
task_unlock(tsk);
BUG_ON(active_mm != old_mm);
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
-@@ -348,6 +348,11 @@ struct mem_cgroup {
+@@ -353,6 +353,11 @@ struct mem_cgroup {
struct deferred_split deferred_split_queue;
#endif
}
--- a/kernel/fork.c
+++ b/kernel/fork.c
-@@ -1083,6 +1083,7 @@ static struct mm_struct *mm_init(struct
+@@ -1091,6 +1091,7 @@ static struct mm_struct *mm_init(struct
goto fail_nocontext;
mm->user_ns = get_user_ns(user_ns);
return mm;
fail_nocontext:
-@@ -1125,6 +1126,7 @@ static inline void __mmput(struct mm_str
+@@ -1133,6 +1134,7 @@ static inline void __mmput(struct mm_str
}
if (mm->binfmt)
module_put(mm->binfmt->module);
mmdrop(mm);
}
-@@ -2622,6 +2624,13 @@ pid_t kernel_clone(struct kernel_clone_a
+@@ -2625,6 +2627,13 @@ pid_t kernel_clone(struct kernel_clone_a
get_task_struct(p);
}
/* forking complete and child started to run, tell ptracer */
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
-@@ -5007,6 +5007,7 @@ context_switch(struct rq *rq, struct tas
+@@ -5014,6 +5014,7 @@ context_switch(struct rq *rq, struct tas
* finish_task_switch()'s mmdrop().
*/
switch_mm_irqs_off(prev->active_mm, next->mm, next);
/* will mmdrop() in finish_task_switch(). */
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
-@@ -6212,6 +6212,30 @@ static void mem_cgroup_move_task(void)
+@@ -6213,6 +6213,30 @@ static void mem_cgroup_move_task(void)
}
#endif
static int seq_puts_memcg_tunable(struct seq_file *m, unsigned long value)
{
if (value == PAGE_COUNTER_MAX)
-@@ -6555,6 +6579,7 @@ struct cgroup_subsys memory_cgrp_subsys
+@@ -6556,6 +6580,7 @@ struct cgroup_subsys memory_cgrp_subsys
.css_reset = mem_cgroup_css_reset,
.css_rstat_flush = mem_cgroup_css_rstat_flush,
.can_attach = mem_cgroup_can_attach,