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:
|
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:
|
||||||
|
@ -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:
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,6 @@ ast(struct trapframe *framep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
userret(td, framep);
|
userret(td, framep);
|
||||||
mtx_assert(&Giant, MA_NOTOWNED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,7 +297,6 @@ trap(struct trapframe *frame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
userret(td, frame);
|
userret(td, frame);
|
||||||
mtx_assert(&Giant, MA_NOTOWNED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -249,7 +249,6 @@ trap(struct trapframe *frame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
userret(td, frame);
|
userret(td, frame);
|
||||||
mtx_assert(&Giant, MA_NOTOWNED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -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"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user