c90890a7a78adf1b201153161205c5e9b19de5a3
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 405-b43_locking_fix.patch
1 Subject: [PATCH] b43: work around a locking issue in ->set_tim()
2
3 ops->set_tim() must be atomic, so b43 trying to acquire a mutex leads
4 to a kernel crash. This patch trades an easy to trigger crash in AP
5 mode for an unlikely race condition. According to Michael, the real
6 fix would be to allow set_tim() callbacks to sleep, since b43 is
7 not the only driver that needs to sleep in all callbacks.
8
9 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10
11 --- a/drivers/net/wireless/b43/main.c
12 +++ b/drivers/net/wireless/b43/main.c
13 @@ -4534,9 +4534,8 @@ static int b43_op_beacon_set_tim(struct
14 {
15 struct b43_wl *wl = hw_to_b43_wl(hw);
16
17 - mutex_lock(&wl->mutex);
18 + /* FIXME: add locking */
19 b43_update_templates(wl);
20 - mutex_unlock(&wl->mutex);
21
22 return 0;
23 }