Index: head/sys/kern/subr_trap.c =================================================================== --- head/sys/kern/subr_trap.c +++ head/sys/kern/subr_trap.c @@ -134,9 +134,6 @@ KTRUSERRET(td); #endif - td_softdep_cleanup(td); - MPASS(td->td_su == NULL); - /* * Charge system time if profiling. */ @@ -188,8 +185,6 @@ ("userret: Returning with preallocated vnode")); KASSERT((td->td_flags & (TDF_SBDRY | TDF_SEINTR | TDF_SERESTART)) == 0, ("userret: Returning with stop signals deferred")); - KASSERT(td->td_su == NULL, - ("userret: Returning with SU cleanup request not handled")); KASSERT(td->td_vslock_sz == 0, ("userret: Returning with vslock-wired space")); #ifdef VIMAGE @@ -278,6 +273,9 @@ ktrcsw(0, 1, __func__); #endif } + + td_softdep_cleanup(td); + MPASS(td->td_su == NULL); /* * If this thread tickled GEOM, we need to wait for the giggling to