Date: Sun, 26 Mar 2017 17:59:51 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315992 - head/sys/dev/iwn Message-ID: <201703261759.v2QHxpTX001119@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sun Mar 26 17:59:51 2017 New Revision: 315992 URL: https://svnweb.freebsd.org/changeset/base/315992 Log: iwn: fix error handling for one well-known corner case. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Mar 26 17:46:42 2017 (r315991) +++ head/sys/dev/iwn/if_iwn.c Sun Mar 26 17:59:51 2017 (r315992) @@ -4739,9 +4739,19 @@ iwn_tx_cmd(struct iwn_softc *sc, struct error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, m, segs, &nsegs, BUS_DMA_NOWAIT); if (error != 0) { + /* XXX fix this */ + /* + * NB: Do not return error; + * original mbuf does not exist anymore. + */ device_printf(sc->sc_dev, - "%s: can't map mbuf (error %d)\n", __func__, error); - return error; + "%s: can't map mbuf (error %d)\n", + __func__, error); + if_inc_counter(ni->ni_vap->iv_ifp, + IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); + m_freem(m); + return 0; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703261759.v2QHxpTX001119>