Skip to content

Commit

Permalink
b43: work around a locking issue in ->set_tim()
Browse files Browse the repository at this point in the history
ops->set_tim() must be atomic, so b43 trying to acquire a mutex leads
to a kernel crash. This patch trades an easy to trigger crash in AP
mode for an unlikely race condition. According to Michael, the real
fix would be to allow set_tim() to sleep, since b43 is not the only
driver that needs to sleep in all callbacks.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Nov 10, 2009
1 parent d8e2352 commit 8f61128
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4521,9 +4521,8 @@ static int b43_op_beacon_set_tim(struct ieee80211_hw *hw,
{
struct b43_wl *wl = hw_to_b43_wl(hw);

mutex_lock(&wl->mutex);
/* FIXME: add locking */
b43_update_templates(wl);
mutex_unlock(&wl->mutex);

return 0;
}
Expand Down

0 comments on commit 8f61128

Please sign in to comment.