From owner-svn-src-all@FreeBSD.ORG Fri Apr 12 16:03:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0DF54BFF; Fri, 12 Apr 2013 16:03:23 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0067E1008; Fri, 12 Apr 2013 16:03:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CG3MSu061762; Fri, 12 Apr 2013 16:03:22 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CG3Mm6061760; Fri, 12 Apr 2013 16:03:22 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201304121603.r3CG3Mm6061760@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 12 Apr 2013 16:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249409 - head/sys/mips/nlm/dev/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 16:03:23 -0000 Author: jchandra Date: Fri Apr 12 16:03:22 2013 New Revision: 249409 URL: http://svnweb.freebsd.org/changeset/base/249409 Log: Fix incorrect KASSERTs in xlpge Fix for crash in Netlogic XLP network accelerator driver when invariants are enabled - use correct the condition for KASSERT. Modified: head/sys/mips/nlm/dev/net/xlpge.c Modified: head/sys/mips/nlm/dev/net/xlpge.c ============================================================================== --- head/sys/mips/nlm/dev/net/xlpge.c Fri Apr 12 15:58:53 2013 (r249408) +++ head/sys/mips/nlm/dev/net/xlpge.c Fri Apr 12 16:03:22 2013 (r249409) @@ -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);