Date: Wed, 04 Nov 2015 12:18:29 -0600 From: Mark Felder <feld@FreeBSD.org> To: Adrian Chadd <adrian@freebsd.org>, Andriy Voskoboinyk <avos@freebsd.org> Cc: freebsd-wireless@freebsd.org Subject: Re: (untested) ath fix upon error Message-ID: <1446661109.2248371.429186785.7A1E02D8@webmail.messagingengine.com> In-Reply-To: <CAJ-Vmon8L2gi=N1SYUN38OmzQRzCaS1MicbOQjXVnuHPsuQ6%2BQ@mail.gmail.com> References: <CAJ-Vmom3hOt63Tc1332hPFpqkEcbSvrCA=nRGgwMLLf02Pbr2Q@mail.gmail.com> <op.x7i8nmgh4dikkl@localhost> <CAJ-Vmon8L2gi=N1SYUN38OmzQRzCaS1MicbOQjXVnuHPsuQ6%2BQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 4, 2015, at 12:11, Adrian Chadd wrote: > On 3 November 2015 at 08:12, Andriy Voskoboinyk <avos@freebsd.org> wrote: > > Tue, 03 Nov 2015 17:31:18 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0= =D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Adrian Chadd > > <adrian@freebsd.org>: > > > > > >> hiya, > >> > >> what do people think about this to fix ath(4) transmit errors: > >> > >> adrian@victoria:~/work/freebsd/head-embedded/src % svn diff sys/dev/ath > >> Index: sys/dev/ath/if_ath.c > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> --- sys/dev/ath/if_ath.c (revision 290048) > >> +++ sys/dev/ath/if_ath.c (working copy) > >> @@ -3320,6 +3320,9 @@ > >> * > >> * Note: if this fails, then the mbufs are freed but > >> * not the node reference. > >> + * > >> + * So, we now have to free the node reference ourselves here > >> + * and return OK up to the stack. > >> */ > >> next =3D m->m_nextpkt; > >> if (ath_tx_start(sc, ni, bf, m)) { > >> @@ -3336,7 +3339,14 @@ > >> */ > >> ath_txfrag_cleanup(sc, &frags, ni); > >> ATH_TXBUF_UNLOCK(sc); > >> - retval =3D ENOBUFS; > >> + > >> + /* > >> + * XXX: And free the node/return OK; ath_tx_start() may > >> have > >> + * modified the buffer. We currently have no way= to > >> + * signify that the mbuf was freed but there was = an > >> error. > >> + */ > >> + ieee80211_node_free(ni); > >> + retval =3D 0; > >> goto finish; > >> } > >> > >> > >> .. the idea is that we can't return failure once we've called > >> ath_tx_start(), as the mbuf needs to be consumed. So we return OK and > >> just count an error. > >> > > > > Yes, I think this (temporary?) workaround should fix the issue. > > >=20 > Cool, thanks! >=20 >=20 > -a I'm running it... if I can manage a few days uptime it has worked. --=20 Mark Felder ports-secteam member feld@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1446661109.2248371.429186785.7A1E02D8>