]> git.karo-electronics.de Git - linux-beck.git/blobdiff - kernel/fork.c
futex: Nullify robust lists after cleanup
[linux-beck.git] / kernel / fork.c
index bfee931ee3fbf7f91045f7b6db6f7eb75c3b4644..88ef51ca84de022059dda6145568482a4ee723b2 100644 (file)
@@ -543,11 +543,15 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
 
        /* Get rid of any futexes when releasing the mm */
 #ifdef CONFIG_FUTEX
-       if (unlikely(tsk->robust_list))
+       if (unlikely(tsk->robust_list)) {
                exit_robust_list(tsk);
+               tsk->robust_list = NULL;
+       }
 #ifdef CONFIG_COMPAT
-       if (unlikely(tsk->compat_robust_list))
+       if (unlikely(tsk->compat_robust_list)) {
                compat_exit_robust_list(tsk);
+               tsk->compat_robust_list = NULL;
+       }
 #endif
 #endif