DORMANTno replies

[PATCH 3/5] smc911x: Fix release of an unheld spinlock

From: Jason Borg <hidden>
Date: 2006-08-23 19:16:36

Fixes the release of a spinlock that can occur without
the spinlock having been taken.

Signed-off-by: Jason Borg <redacted>
---

diff -uprN linux-2.6.18-rc4-orig/drivers/net/smc911x.c linux-2.6.18-rc4/drivers/net/smc911x.c
--- linux-2.6.18-rc4-orig/drivers/net/smc911x.c	2006-08-22 15:41:04.914560562 -0400
+++ linux-2.6.18-rc4/drivers/net/smc911x.c	2006-08-22 15:47:14.057064822 -0400
@@ -967,11 +967,11 @@ static void smc911x_phy_configure(void *
 	 * We should not be called if phy_type is zero.
 	 */
 	if (lp->phy_type == 0)
-		 goto smc911x_phy_configure_exit;
+		goto smc911x_phy_configure_exit_pre_lock;
 
 	if (smc911x_phy_reset(dev, phyaddr)) {
 		printk("%s: PHY reset timed out\n", dev->name);
-		goto smc911x_phy_configure_exit;
+		goto smc911x_phy_configure_exit_pre_lock;
 	}
 	spin_lock_irqsave(&lp->lock, flags);
 
@@ -1040,6 +1040,7 @@ static void smc911x_phy_configure(void *
 
 smc911x_phy_configure_exit:
 	spin_unlock_irqrestore(&lp->lock, flags);
+smc911x_phy_configure_exit_pre_lock:
 	lp->work_pending = 0;
 }
 

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help