summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-24 13:10:17 +0000
committerjhb <jhb@FreeBSD.org>2001-01-24 13:10:17 +0000
commitcf8988088c93f558376af9dce26c17d5aa766731 (patch)
tree63d041c74e2a17d7dc30cd371bb0af8cfe8b058a
parente70d7adf60f7f2ae14070cb6c3f23112593ac48d (diff)
downloadFreeBSD-src-cf8988088c93f558376af9dce26c17d5aa766731.zip
FreeBSD-src-cf8988088c93f558376af9dce26c17d5aa766731.tar.gz
Oops, when converting if (foo) panic() to a KASSERT(), you have to invert
the test case. Spotted by: peter, jasone
-rw-r--r--sys/alpha/alpha/pmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index a57bf3e..0a8fc4d 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -2843,8 +2843,8 @@ pmap_emulate_reference(struct proc *p, vm_offset_t v, int user, int write)
panic("pmap_emulate_reference: user ref to kernel");
pte = vtopte(v);
} else {
- KASSERT(p == NULL, ("pmap_emulate_reference: bad proc"));
- KASSERT(p->p_vmspace == NULL, ("pmap_emulate_reference: bad p_vmspace"));
+ KASSERT(p != NULL, ("pmap_emulate_reference: bad proc"));
+ KASSERT(p->p_vmspace != NULL, ("pmap_emulate_reference: bad p_vmspace"));
pte = pmap_lev3pte(p->p_vmspace->vm_map.pmap, v);
}
#ifdef DEBUG /* These checks are more expensive */
@@ -2872,7 +2872,8 @@ pmap_emulate_reference(struct proc *p, vm_offset_t v, int user, int write)
#endif
pa = pmap_pte_pa(pte);
- KASSERT((*pte & PG_MANAGED) == 0, ("pmap_emulate_reference(%p, 0x%lx, %d, %d): pa 0x%lx not managed",
+ KASSERT((*pte & PG_MANAGED) != 0,
+ ("pmap_emulate_reference(%p, 0x%lx, %d, %d): pa 0x%lx not managed",
p, v, user, write, pa));
/*
OpenPOWER on IntegriCloud