Merge branch 'akpm-current/current'
[deliverable/linux.git] / kernel / fork.c
index c2ecca44406b130e0ec7abc4d2648beff6738814..3584f521e3a63d82b6f1827f5f856fb0832d8077 100644 (file)
@@ -286,6 +286,12 @@ static inline void free_signal_struct(struct signal_struct *sig)
 {
        taskstats_tgid_free(sig);
        sched_autogroup_exit(sig);
+       /*
+        * __mmdrop is not safe to call from softirq context on x86 due to
+        * pgd_dtor so postpone it to the async context
+        */
+       if (sig->oom_mm)
+               mmdrop_async(sig->oom_mm);
        kmem_cache_free(signal_cachep, sig);
 }
 
@@ -768,6 +774,7 @@ static inline void __mmput(struct mm_struct *mm)
        ksm_exit(mm);
        khugepaged_exit(mm); /* must run before exit_mmap */
        exit_mmap(mm);
+       mm_put_huge_zero_page(mm);
        set_mm_exe_file(mm, NULL);
        if (!list_empty(&mm->mmlist)) {
                spin_lock(&mmlist_lock);
@@ -776,6 +783,7 @@ static inline void __mmput(struct mm_struct *mm)
        }
        if (mm->binfmt)
                module_put(mm->binfmt->module);
+       set_bit(MMF_OOM_SKIP, &mm->flags);
        mmdrop(mm);
 }
 
This page took 0.024083 seconds and 5 git commands to generate.