From owner-svn-src-head@freebsd.org Mon Aug 8 16:19:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 662C5BB122D; Mon, 8 Aug 2016 16:19:25 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 374BD1CDA; Mon, 8 Aug 2016 16:19:25 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78GJOV0052764; Mon, 8 Aug 2016 16:19:24 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78GJOCk052763; Mon, 8 Aug 2016 16:19:24 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201608081619.u78GJOCk052763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Mon, 8 Aug 2016 16:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303836 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 16:19:25 -0000 Author: rstone Date: Mon Aug 8 16:19:24 2016 New Revision: 303836 URL: https://svnweb.freebsd.org/changeset/base/303836 Log: Don't enqueue NULL on a drbr In one corner case in the bxe TX path, a NULL mbuf could be enqueued onto a drbr queue. This could case a KASSERT to fire with INVARIANTS enabled, or the processing of packets from the queue to be prematurely ended later on. Submitted by: Matt Joras (matt.joras AT isilon.com) Reviewed by: davidcs MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7041 Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Mon Aug 8 15:07:38 2016 (r303835) +++ head/sys/dev/bxe/bxe.c Mon Aug 8 16:19:24 2016 (r303836) @@ -5624,7 +5624,8 @@ bxe_tx_mq_start_locked(struct bxe_softc if (!sc->link_vars.link_up || (if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) { - rc = drbr_enqueue(ifp, tx_br, m); + if (m != NULL) + rc = drbr_enqueue(ifp, tx_br, m); goto bxe_tx_mq_start_locked_exit; }