[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
upl(4) memleak, please test
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: upl(4) memleak, please test
- From: Philipp Buehler <pb_(_at_)_openbsd_(_dot_)_de>
- Date: Sat, 26 Jun 2004 20:28:21 +0200
- Mail-followup-to: Philipp Buehler <pb_(_at_)_openbsd_(_dot_)_de>, tech_(_at_)_openbsd_(_dot_)_org
hi,
use the "new" IF_INPUT_ENQUEUE macro in upl(4)
bonus: do not count dropped packets twice and dont memleak
under full queue conditions (ick!).
Index: sys/dev/usb/if_upl.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_upl.c,v
retrieving revision 1.15
diff -u -r1.15 if_upl.c
--- sys/dev/usb/if_upl.c 15 Dec 2003 23:36:14 -0000 1.15
+++ sys/dev/usb/if_upl.c 26 Jun 2004 18:25:34 -0000
@@ -1091,17 +1091,7 @@
inq = &ipintrq;
s = splnet();
- if (IF_QFULL(inq)) {
- IF_DROP(inq);
- splx(s);
-#if 0
- if (sc->sc_flags & SC_DEBUG)
- printf("%s: input queue full\n", ifp->if_xname);
-#endif
- ifp->if_iqdrops++;
- return;
- }
- IF_ENQUEUE(inq, m);
+ IF_INPUT_ENQUEUE(inq, m);
splx(s);
ifp->if_ipackets++;
ifp->if_ibytes += m->m_len;
--
pb@
Visit your host, monkey.org