Skip to contentSkip to conversation

netdev: ehea: locking order correction

PATCH Applied [email protected] 1 participant 1 message Mar 28, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 16/21 netdev: ehea: locking order correction

From: Daniel Walker <[email protected]>

Nested locks always need to be taken in the same order. This change factors out the ehea_fw_handles.lock to make the locking order consistent.

Cc Jeff Garzik <[email protected]>
Cc Christoph Raisch <[email protected]>
Cc Jan-Bernd Themann <[email protected]>
Cc Thomas Klein <[email protected]>

---

 drivers/net/ehea/ehea_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ehea/ehea_main.c renamed from drivers/net/ehea/ehea_main.c~net-ehea-locking-order-correction +2 -2
diff -puN drivers/net/ehea/ehea_main.c~net-ehea-locking-order-correction drivers/net/ehea/ehea_main.c
@@ -2567,14 +2567,14 @@ static int ehea_down(struct net_device *
 	if (port->state == EHEA_PORT_DOWN)
 		return 0;
 
+	mutex_lock(&ehea_fw_handles.lock);
+
 	down(&ehea_bcmc_regs.lock);
 	ehea_drop_multicast_list(dev);
 	ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
 
 	ehea_free_interrupts(dev);
 
-	mutex_lock(&ehea_fw_handles.lock);
-
 	port->state = EHEA_PORT_DOWN;
 
 	ehea_update_bcmc_registrations();

_