userret() already checks for td_locks when INVARIANTS is enabled, so

there is no need to check if Giant is acquired after it.

Reviewed by:	kib
MFC after:	1 week
This commit is contained in:
Attilio Rao 2012-09-08 18:27:11 +00:00
parent 1c978ec48b
commit 324e57150d
10 changed files with 0 additions and 10 deletions

View File

@ -632,7 +632,6 @@ trap(struct trapframe *frame)
user: user:
userret(td, frame); userret(td, frame);
mtx_assert(&Giant, MA_NOTOWNED);
KASSERT(PCB_USER_FPU(td->td_pcb), KASSERT(PCB_USER_FPU(td->td_pcb),
("Return from trap with kernel FPU ctx leaked")); ("Return from trap with kernel FPU ctx leaked"));
userout: userout:

View File

@ -775,7 +775,6 @@ trap(struct trapframe *frame)
user: user:
userret(td, frame); userret(td, frame);
mtx_assert(&Giant, MA_NOTOWNED);
KASSERT(PCB_USER_FPU(td->td_pcb), KASSERT(PCB_USER_FPU(td->td_pcb),
("Return from trap with kernel FPU ctx leaked")); ("Return from trap with kernel FPU ctx leaked"));
userout: userout:

View File

@ -278,6 +278,5 @@ ia32_trap(int vector, struct trapframe *tf)
out: out:
userret(td, tf); userret(td, tf);
mtx_assert(&Giant, MA_NOTOWNED);
do_ast(tf); do_ast(tf);
} }

View File

@ -841,7 +841,6 @@ trap(int vector, struct trapframe *tf)
out: out:
if (user) { if (user) {
userret(td, tf); userret(td, tf);
mtx_assert(&Giant, MA_NOTOWNED);
do_ast(tf); do_ast(tf);
} }
return; return;

View File

@ -1055,5 +1055,4 @@ fork_return(struct thread *td, struct trapframe *frame)
if (KTRPOINT(td, KTR_SYSRET)) if (KTRPOINT(td, KTR_SYSRET))
ktrsysret(SYS_fork, 0, 0); ktrsysret(SYS_fork, 0, 0);
#endif #endif
mtx_assert(&Giant, MA_NOTOWNED);
} }

View File

@ -260,7 +260,6 @@ ast(struct trapframe *framep)
} }
userret(td, framep); userret(td, framep);
mtx_assert(&Giant, MA_NOTOWNED);
} }
const char * const char *

View File

@ -1095,7 +1095,6 @@ out:
* Note: we should only get here if returning to user mode. * Note: we should only get here if returning to user mode.
*/ */
userret(td, trapframe); userret(td, trapframe);
mtx_assert(&Giant, MA_NOTOWNED);
return (trapframe->pc); return (trapframe->pc);
} }

View File

@ -297,7 +297,6 @@ trap(struct trapframe *frame)
} }
userret(td, frame); userret(td, frame);
mtx_assert(&Giant, MA_NOTOWNED);
} }
static void static void

View File

@ -249,7 +249,6 @@ trap(struct trapframe *frame)
} }
userret(td, frame); userret(td, frame);
mtx_assert(&Giant, MA_NOTOWNED);
} }
static void static void

View File

@ -329,7 +329,6 @@ trap(struct trapframe *tf)
} }
userret(td, tf); userret(td, tf);
mtx_assert(&Giant, MA_NOTOWNED);
} else { } else {
KASSERT((tf->tf_type & T_KERNEL) != 0, KASSERT((tf->tf_type & T_KERNEL) != 0,
("trap: kernel trap isn't")); ("trap: kernel trap isn't"));