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:
parent
1c978ec48b
commit
324e57150d
@ -632,7 +632,6 @@ trap(struct trapframe *frame)
|
||||
|
||||
user:
|
||||
userret(td, frame);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
KASSERT(PCB_USER_FPU(td->td_pcb),
|
||||
("Return from trap with kernel FPU ctx leaked"));
|
||||
userout:
|
||||
|
@ -775,7 +775,6 @@ trap(struct trapframe *frame)
|
||||
|
||||
user:
|
||||
userret(td, frame);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
KASSERT(PCB_USER_FPU(td->td_pcb),
|
||||
("Return from trap with kernel FPU ctx leaked"));
|
||||
userout:
|
||||
|
@ -278,6 +278,5 @@ ia32_trap(int vector, struct trapframe *tf)
|
||||
|
||||
out:
|
||||
userret(td, tf);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
do_ast(tf);
|
||||
}
|
||||
|
@ -841,7 +841,6 @@ trap(int vector, struct trapframe *tf)
|
||||
out:
|
||||
if (user) {
|
||||
userret(td, tf);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
do_ast(tf);
|
||||
}
|
||||
return;
|
||||
|
@ -1055,5 +1055,4 @@ fork_return(struct thread *td, struct trapframe *frame)
|
||||
if (KTRPOINT(td, KTR_SYSRET))
|
||||
ktrsysret(SYS_fork, 0, 0);
|
||||
#endif
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
}
|
||||
|
@ -260,7 +260,6 @@ ast(struct trapframe *framep)
|
||||
}
|
||||
|
||||
userret(td, framep);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@ -1095,7 +1095,6 @@ out:
|
||||
* Note: we should only get here if returning to user mode.
|
||||
*/
|
||||
userret(td, trapframe);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
return (trapframe->pc);
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,6 @@ trap(struct trapframe *frame)
|
||||
}
|
||||
|
||||
userret(td, frame);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -249,7 +249,6 @@ trap(struct trapframe *frame)
|
||||
}
|
||||
|
||||
userret(td, frame);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -329,7 +329,6 @@ trap(struct trapframe *tf)
|
||||
}
|
||||
|
||||
userret(td, tf);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
} else {
|
||||
KASSERT((tf->tf_type & T_KERNEL) != 0,
|
||||
("trap: kernel trap isn't"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user