Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Aug 2016 16:19:24 +0000 (UTC)
From:      Ryan Stone <rstone@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303836 - head/sys/dev/bxe
Message-ID:  <201608081619.u78GJOCk052763@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
     }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608081619.u78GJOCk052763>