]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/exit.c
futex: Replace PF_EXITPIDONE with a state
[mirror_ubuntu-bionic-kernel.git] / kernel / exit.c
index 8671236be84cfb416330c38ab2e055ebc3327e32..4a1552c3d53bec3d8392c59c07a556c0341984b8 100644 (file)
@@ -803,16 +803,7 @@ void __noreturn do_exit(long code)
         */
        if (unlikely(tsk->flags & PF_EXITING)) {
                pr_alert("Fixing recursive fault but reboot is needed!\n");
-               /*
-                * We can do this unlocked here. The futex code uses
-                * this flag just to verify whether the pi state
-                * cleanup has been done or not. In the worst case it
-                * loops once more. We pretend that the cleanup was
-                * done as there is no way to return. Either the
-                * OWNER_DIED bit is set by now or we push the blocked
-                * task into the wait for ever nirwana as well.
-                */
-               tsk->flags |= PF_EXITPIDONE;
+               futex_exit_done(tsk);
                set_current_state(TASK_UNINTERRUPTIBLE);
                schedule();
        }
@@ -902,12 +893,7 @@ void __noreturn do_exit(long code)
         * Make sure we are holding no locks:
         */
        debug_check_no_locks_held();
-       /*
-        * We can do this unlocked here. The futex code uses this flag
-        * just to verify whether the pi state cleanup has been done
-        * or not. In the worst case it loops once more.
-        */
-       tsk->flags |= PF_EXITPIDONE;
+       futex_exit_done(tsk);
 
        if (tsk->io_context)
                exit_io_context(tsk);