Search Linux Wireless

[PATCH] b43: Fix SDIO interrupt handler deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to release the SDIO host before locking the driver mutex.

Signed-off-by: Michael Buesch <mb@xxxxxxxxx>

---


Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/main.c	2009-09-10 20:26:43.000000000 +0200
+++ wireless-testing/drivers/net/wireless/b43/main.c	2009-09-11 15:55:19.000000000 +0200
@@ -1914,20 +1914,14 @@ static irqreturn_t b43_interrupt_handler
 static void b43_sdio_interrupt_handler(struct b43_wldev *dev)
 {
 	struct b43_wl *wl = dev->wl;
-	struct sdio_func *func = dev->dev->bus->host_sdio;
 	irqreturn_t ret;
 
-	if (unlikely(b43_status(dev) < B43_STAT_STARTED))
-		return;
-
 	mutex_lock(&wl->mutex);
-	sdio_release_host(func);
 
 	ret = b43_do_interrupt(dev);
 	if (ret == IRQ_WAKE_THREAD)
 		b43_do_interrupt_thread(dev);
 
-	sdio_claim_host(func);
 	mutex_unlock(&wl->mutex);
 }
 
Index: wireless-testing/drivers/net/wireless/b43/sdio.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/sdio.c	2009-09-10 19:23:20.000000000 +0200
+++ wireless-testing/drivers/net/wireless/b43/sdio.c	2009-09-11 15:54:05.000000000 +0200
@@ -54,7 +54,12 @@ static void b43_sdio_interrupt_dispatche
 	struct b43_sdio *sdio = sdio_get_drvdata(func);
 	struct b43_wldev *dev = sdio->irq_handler_opaque;
 
+	if (unlikely(b43_status(dev) < B43_STAT_STARTED))
+		return;
+
+	sdio_release_host(func);
 	sdio->irq_handler(dev);
+	sdio_claim_host(func);
 }
 
 int b43_sdio_request_irq(struct b43_wldev *dev,

-- 
Greetings, Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux