Date: Wed, 8 Mar 2017 08:09:46 +0100 From: Sebastian Huber <sebastian.huber@embedded-brains.de> To: freebsd-net@freebsd.org Cc: Sebastian Huber <sebastian.huber@embedded-brains.de> Subject: [PATCH 2/2] if_tsec: Fix deadlock Message-ID: <1488956986-12015-2-git-send-email-sebastian.huber@embedded-brains.de> In-Reply-To: <1488956986-12015-1-git-send-email-sebastian.huber@embedded-brains.de> References: <1488956986-12015-1-git-send-email-sebastian.huber@embedded-brains.de>
next in thread | previous in thread | raw e-mail | index | archive | help
The tsec_error_intr_locked() is called with the global lock owned (e.g.
the transmit and the receive lock are both owned). We must not call
tsec_receive_intr_locked() while owning the transmit lock. The normal
receive interrupt takes care that frames are received, this is none of
the business of the error interrupt.
---
sys/dev/tsec/if_tsec.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c
index 66ee130..0db552b 100644
--- a/sys/dev/tsec/if_tsec.c
+++ b/sys/dev/tsec/if_tsec.c
@@ -1576,9 +1576,6 @@ tsec_error_intr_locked(struct tsec_softc *sc, int count)
/* Check for discarded frame due to a lack of buffers */
if (eflags & TSEC_IEVENT_BSY) {
if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
-
- /* Get data from RX buffers */
- tsec_receive_intr_locked(sc, count);
}
if (ifp->if_flags & IFF_DEBUG)
--
1.8.4.5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1488956986-12015-2-git-send-email-sebastian.huber>
