diff options
author | rstone <rstone@FreeBSD.org> | 2016-08-15 19:18:10 +0000 |
---|---|---|
committer | rstone <rstone@FreeBSD.org> | 2016-08-15 19:18:10 +0000 |
commit | b38c18fe680be7086c69c99b8087ccfbdc78acb4 (patch) | |
tree | 600dc61e5dfcd66949b1b4cc3a157c8742bd04a7 | |
parent | ac1f0fe5d11b3ceea813a52c9e86c2a05183af91 (diff) | |
download | FreeBSD-src-b38c18fe680be7086c69c99b8087ccfbdc78acb4.zip FreeBSD-src-b38c18fe680be7086c69c99b8087ccfbdc78acb4.tar.gz |
MFC r304163
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 cause 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
Sponsored by: EMC / Isilon Storage Division
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D7041
-rw-r--r-- | sys/dev/bxe/bxe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index e832389..329801d 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -5624,7 +5624,8 @@ bxe_tx_mq_start_locked(struct bxe_softc *sc, 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; } |