Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2016 16:28:30 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307926 - head/sys/dev/bfe
Message-ID:  <201610251628.u9PGSUAq056849@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Tue Oct 25 16:28:30 2016
New Revision: 307926
URL: https://svnweb.freebsd.org/changeset/base/307926

Log:
  Check m_getcl() return value.
  
  CID:	611376

Modified:
  head/sys/dev/bfe/if_bfe.c

Modified: head/sys/dev/bfe/if_bfe.c
==============================================================================
--- head/sys/dev/bfe/if_bfe.c	Tue Oct 25 16:25:06 2016	(r307925)
+++ head/sys/dev/bfe/if_bfe.c	Tue Oct 25 16:28:30 2016	(r307926)
@@ -793,6 +793,8 @@ bfe_list_newbuf(struct bfe_softc *sc, in
 	int nsegs;
 
 	m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
+	if (m == NULL)
+		return (ENOBUFS);
 	m->m_len = m->m_pkthdr.len = MCLBYTES;
 
 	if (bus_dmamap_load_mbuf_sg(sc->bfe_rxmbuf_tag, sc->bfe_rx_sparemap,



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