]> err.no Git - linux-2.6/blobdiff - kernel/exit.c
Merge branch 'nommu' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / kernel / exit.c
index 304ef637be6c700e7b5d73172222a0e05e5f96d8..ab06b9f88f64677ca036dea0285f740ccb54e1e9 100644 (file)
@@ -925,10 +925,19 @@ fastcall NORET_TYPE void do_exit(long code)
        mpol_free(tsk->mempolicy);
        tsk->mempolicy = NULL;
 #endif
+       /*
+        * This must happen late, after the PID is not
+        * hashed anymore:
+        */
+       if (unlikely(!list_empty(&tsk->pi_state_list)))
+               exit_pi_state_list(tsk);
+       if (unlikely(current->pi_state_cache))
+               kfree(current->pi_state_cache);
        /*
         * If DEBUG_MUTEXES is on, make sure we are holding no locks:
         */
        mutex_debug_check_no_locks_held(tsk);
+       rt_mutex_debug_check_no_locks_held(tsk);
 
        if (tsk->io_context)
                exit_io_context();