summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-09-08 18:27:11 +0000
committerattilio <attilio@FreeBSD.org>2012-09-08 18:27:11 +0000
commit8dece93b14588b73bf5dec69091706dcdccba2fc (patch)
tree52124b3834c9171d7973cf98f0dd6c90bfdfdc9b
parentc069e61b00c591709456d152a3b719e87ac7e570 (diff)
downloadFreeBSD-src-8dece93b14588b73bf5dec69091706dcdccba2fc.zip
FreeBSD-src-8dece93b14588b73bf5dec69091706dcdccba2fc.tar.gz
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
-rw-r--r--sys/amd64/amd64/trap.c1
-rw-r--r--sys/i386/i386/trap.c1
-rw-r--r--sys/ia64/ia32/ia32_trap.c1
-rw-r--r--sys/ia64/ia64/trap.c1
-rw-r--r--sys/kern/kern_fork.c1
-rw-r--r--sys/kern/subr_trap.c1
-rw-r--r--sys/mips/mips/trap.c1
-rw-r--r--sys/powerpc/aim/trap.c1
-rw-r--r--sys/powerpc/booke/trap.c1
-rw-r--r--sys/sparc64/sparc64/trap.c1
10 files changed, 0 insertions, 10 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 62533cb..bfe49bc 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -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:
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index c0c5678..7536f11 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -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:
diff --git a/sys/ia64/ia32/ia32_trap.c b/sys/ia64/ia32/ia32_trap.c
index 44e0648..cea8f92 100644
--- a/sys/ia64/ia32/ia32_trap.c
+++ b/sys/ia64/ia32/ia32_trap.c
@@ -278,6 +278,5 @@ ia32_trap(int vector, struct trapframe *tf)
out:
userret(td, tf);
- mtx_assert(&Giant, MA_NOTOWNED);
do_ast(tf);
}
diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c
index d587b05..c0cdaa9 100644
--- a/sys/ia64/ia64/trap.c
+++ b/sys/ia64/ia64/trap.c
@@ -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;
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 46cdca1..5dc43ca 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -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);
}
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 095bbdf..dcba5b8 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -260,7 +260,6 @@ ast(struct trapframe *framep)
}
userret(td, framep);
- mtx_assert(&Giant, MA_NOTOWNED);
}
const char *
diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c
index 7254d4f..5b4e0aa 100644
--- a/sys/mips/mips/trap.c
+++ b/sys/mips/mips/trap.c
@@ -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);
}
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index d419e43..b55d34b 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -297,7 +297,6 @@ trap(struct trapframe *frame)
}
userret(td, frame);
- mtx_assert(&Giant, MA_NOTOWNED);
}
static void
diff --git a/sys/powerpc/booke/trap.c b/sys/powerpc/booke/trap.c
index cd2ab38..959d8b1 100644
--- a/sys/powerpc/booke/trap.c
+++ b/sys/powerpc/booke/trap.c
@@ -249,7 +249,6 @@ trap(struct trapframe *frame)
}
userret(td, frame);
- mtx_assert(&Giant, MA_NOTOWNED);
}
static void
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index 12264b0..b4f0e27 100644
--- a/sys/sparc64/sparc64/trap.c
+++ b/sys/sparc64/sparc64/trap.c
@@ -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"));
OpenPOWER on IntegriCloud