Skip to contentSkip to conversation

wl1271: add missing spin_lock()

PATCH In review Dan Carpenter 2 participants 2 messages May 8, 2010 – May 11, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 7/9 wl1271: add missing spin_lock()

We should start the loop consistently with the "wl_lock" lock held.

drivers/net/wireless/wl12xx/wl1271_main.c +1 -0
index 3e4b9fb..b61cd10 100644
@@ -466,6 +466,7 @@ static void wl1271_irq_work(struct work_struct *work)
 		intr = le32_to_cpu(wl->fw_status->intr);
 		if (!intr) {
 			wl1271_debug(DEBUG_IRQ, "Zero interrupt received.");
+			spin_lock_irqsave(&wl->wl_lock, flags);
 			continue;
 		}
 
Acked-by on v1 7/9
#1 lore raw
Quoted 9 lines · ext Dan Carpenter

We should start the loop consistently with the "wl_lock" lock held.

drivers/net/wireless/wl12xx/wl1271_main.c +0 -0
index 3e4b9fb..b61cd10 100644

drivers/net/wireless/wl12xx/wl1271_main.c static void wl1271_irq_work(struct work_struct *work) · line 472

Quoted 7 lines
drivers/net/wireless/wl12xx/wl1271_main.c +1 -0
@@ -466,6 +466,7 @@ static void wl1271_irq_work(struct work_struct *work)
 		intr = le32_to_cpu(wl->fw_status->intr);
 		if (!intr) {
 			wl1271_debug(DEBUG_IRQ, "Zero interrupt received.");
+			spin_lock_irqsave(&wl->wl_lock, flags);
 			continue;
 		}
 

Good catch. Thank you.

Signature · 2 lines
Cheers,
Luca.