* [PATCH] b43: work around a locking issue in ->set_tim()
@ 2009-11-07 17:37 Felix Fietkau
2009-11-07 19:19 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2009-11-07 17:37 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville, Johannes Berg, Michael Buesch
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>
---
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4534,9 +4534,8 @@ static int b43_op_beacon_set_tim(struct
{
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] b43: work around a locking issue in ->set_tim()
2009-11-07 17:37 [PATCH] b43: work around a locking issue in ->set_tim() Felix Fietkau
@ 2009-11-07 19:19 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-11-07 19:19 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, John W. Linville, Michael Buesch
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
On Sat, 2009-11-07 at 18:37 +0100, Felix Fietkau wrote:
> 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.
According to me, that's pretty much impossible... But patches welcome,
of course. :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-07 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-07 17:37 [PATCH] b43: work around a locking issue in ->set_tim() Felix Fietkau
2009-11-07 19:19 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.