diff options
author | Jayachandran C. <jchandra@FreeBSD.org> | 2013-04-12 16:03:22 +0000 |
---|---|---|
committer | Jayachandran C. <jchandra@FreeBSD.org> | 2013-04-12 16:03:22 +0000 |
commit | d1a51785b3aef6ac9340623162c2fd18b2f82e4d (patch) | |
tree | 5897465384f8e8862c29e326873f7b29da528a40 | |
parent | 15f9c9ed69b65708a5da43504702622fb6cdacff (diff) | |
download | src-d1a51785b3aef6ac9340623162c2fd18b2f82e4d.tar.gz src-d1a51785b3aef6ac9340623162c2fd18b2f82e4d.zip |
Fix incorrect KASSERTs in xlpge
Fix for crash in Netlogic XLP network accelerator driver when invariants
are enabled - use correct the condition for KASSERT.
Notes
Notes:
svn path=/head/; revision=249409
-rw-r--r-- | sys/mips/nlm/dev/net/xlpge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/mips/nlm/dev/net/xlpge.c b/sys/mips/nlm/dev/net/xlpge.c index 6d221e4b6e75..18a14b132d01 100644 --- a/sys/mips/nlm/dev/net/xlpge.c +++ b/sys/mips/nlm/dev/net/xlpge.c @@ -975,7 +975,7 @@ nlm_mii_pollstat(void *arg) if (sc->mii_bus) { mii = device_get_softc(sc->mii_bus); - KASSERT(mii == NULL, ("mii ptr is NULL")); + KASSERT(mii != NULL, ("mii ptr is NULL")); mii_pollstat(mii); @@ -1143,7 +1143,7 @@ get_buf(void) #ifdef INVARIANTS temp1 = vtophys((vm_offset_t) m_new->m_data); temp2 = vtophys((vm_offset_t) m_new->m_data + 1536); - KASSERT((temp1 + 1536) != temp2, + KASSERT((temp1 + 1536) == temp2, ("Alloced buffer is not contiguous")); #endif return ((void *)m_new->m_data); |