diff options
author | njl <njl@FreeBSD.org> | 2003-06-23 23:23:49 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2003-06-23 23:23:49 +0000 |
commit | 9a60d0f2a2edf990ecdf15b750159cc83acfce6b (patch) | |
tree | de8b37112eb48fa3e513d4865470854d600c6ad0 /sys/dev/fxp | |
parent | 931dcaae39f62974707109a3d22e0bfa45f092f3 (diff) | |
download | FreeBSD-src-9a60d0f2a2edf990ecdf15b750159cc83acfce6b.zip FreeBSD-src-9a60d0f2a2edf990ecdf15b750159cc83acfce6b.tar.gz |
Drop locks before calling if_input() since it may re-enter fxp_start()
in the netisr case. This would result in a lock reversal. This
fixes the net.isr.enable=1 case. Better performance might be
obtained by chaining all packets received, dropping the lock, and
then calling if_input() on each one.
Reported by: hmp
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 59f80a8..80f0bac 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -1733,7 +1733,17 @@ fxp_intr_body(struct fxp_softc *sc, struct ifnet *ifp, u_int8_t statack, m->m_pkthdr.len = m->m_len = total_len; m->m_pkthdr.rcvif = ifp; + /* + * Drop locks before calling if_input() since it + * may re-enter fxp_start() in the netisr case. + * This would result in a lock reversal. Better + * performance might be obtained by chaining all + * packets received, dropping the lock, and then + * calling if_input() on each one. + */ + FXP_UNLOCK(sc); (*ifp->if_input)(ifp, m); + FXP_LOCK(sc); } } if (rnr) { |