ksm: fix deadlock with munlock in exit_mmap
[profile/ivi/kernel-adaptation-intel-automotive.git] / kernel / fork.c
index 42f20f5..73a442b 100644 (file)
@@ -501,6 +501,7 @@ void mmput(struct mm_struct *mm)
 
        if (atomic_dec_and_test(&mm->mm_users)) {
                exit_aio(mm);
+               ksm_exit(mm);
                exit_mmap(mm);
                set_mm_exe_file(mm, NULL);
                if (!list_empty(&mm->mmlist)) {