diff options
author | wpaul <wpaul@FreeBSD.org> | 2005-12-16 17:21:28 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2005-12-16 17:21:28 +0000 |
commit | 2e4c2f73c4a8e57e3ffe382e01d9b0c8b1dcaf17 (patch) | |
tree | b8d091f1cccc14a44f4a676417b1b8e9cfa03898 /sys/dev | |
parent | eb013becb03c4e34a40d5af14a83228da95e10e1 (diff) | |
download | FreeBSD-src-2e4c2f73c4a8e57e3ffe382e01d9b0c8b1dcaf17.zip FreeBSD-src-2e4c2f73c4a8e57e3ffe382e01d9b0c8b1dcaf17.tar.gz |
In ndis_rxeof_eth(), avoid acquiring the NDIS miniport block spinlock for
serialized miniports when updating the packet list.
This fixes a deadlock that can occur with the Ralink RT2500 driver
when using wpa_supplicant.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 00c5216..296d9a7 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -1129,11 +1129,13 @@ ndis_rxeof_eth(adapter, ctx, addr, hdr, hdrlen, lookahead, lookaheadlen, pktlen) priv = (ndis_ethpriv *)&p->np_protocolreserved; priv->nep_ctx = ctx; - KeAcquireSpinLock(&block->nmb_lock, &irql); + if (!NDIS_SERIALIZED(block)) + KeAcquireSpinLock(&block->nmb_lock, &irql); InsertTailList((&block->nmb_packetlist), (&p->np_list)); - KeReleaseSpinLock(&block->nmb_lock, irql); + if (!NDIS_SERIALIZED(block)) + KeReleaseSpinLock(&block->nmb_lock, irql); return; } |