Commit 96869a39 authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville
Browse files

b43: Workaround circular locking in hw-tkip key update callback

The TKIP key update callback is called from the RX path, where the driver
mutex is already locked. This results in a circular locking bug.
Avoid this by removing the lock.

Johannes noted that there is a separate bug: The callback still breaks on SDIO
hardware, because SDIO hardware access needs to sleep, but we are not allowed
to sleep in the callback due to mac80211's RCU locking.
Signed-off-by: default avatarMichael Buesch <>
Tested-by: default avatarLarry Finger <>
Cc: Johannes Berg <>
Cc: stable <>
Signed-off-by: default avatarJohn W. Linville <>
parent 65896510
......@@ -856,22 +856,19 @@ static void b43_op_update_tkip_key(struct ieee80211_hw *hw,
if (B43_WARN_ON(!modparam_hwtkip))
/* This is only called from the RX path through mac80211, where
* our mutex is already locked. */
dev = wl->current_dev;
if (!dev || b43_status(dev) < B43_STAT_INITIALIZED)
goto out_unlock;
B43_WARN_ON(!dev || b43_status(dev) < B43_STAT_INITIALIZED);
keymac_write(dev, index, NULL); /* First zero out mac to avoid race */
rx_tkip_phase1_write(dev, index, iv32, phase1key);
/* only pairwise TKIP keys are supported right now */
if (WARN_ON(!sta))
goto out_unlock;
keymac_write(dev, index, sta->addr);
static void do_key_write(struct b43_wldev *dev,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment