From owner-svn-src-head@freebsd.org Sun Mar 26 17:59:52 2017 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 66301D1E2D9; Sun, 26 Mar 2017 17:59:52 +0000 (UTC) (envelope-from avos@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 359281088; Sun, 26 Mar 2017 17:59:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2QHxpGd001120; Sun, 26 Mar 2017 17:59:51 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2QHxpTX001119; Sun, 26 Mar 2017 17:59:51 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201703261759.v2QHxpTX001119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 26 Mar 2017 17:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315992 - head/sys/dev/iwn 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.23 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: Sun, 26 Mar 2017 17:59:52 -0000 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; } }