Skip to contentSkip to conversation

RDMA/nes: fix incorrect unlock in nes_process_mac_intr

PATCH Applied Chien Tung 2 participants 2 messages May 25, 2010 InfiniBand

lore
Share & tools
lore

Chien Tung

author
#0 lore raw

PATCH 1/1 RDMA/nes: fix incorrect unlock in nes_process_mac_intr

commit ce6e74f2 introduced a problem where unlock took place only within an if statement.

sparse warning:

drivers/infiniband/hw/nes/nes_hw.c:2643:9: warning: context imbalance in 'nes_process_mac_intr' - different lock contexts for basic block

---
 drivers/infiniband/hw/nes/nes_hw.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/infiniband/hw/nes/nes_hw.c +2 -1
index bb9c775..57874a1 100644
@@ -2584,7 +2584,6 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
 				break;
 			}
 		}
-		spin_unlock_irqrestore(&nesadapter->phy_lock, flags);
 
 		if (phy_data & 0x0004) {
 			if (wide_ppm_offset &&
@@ -2639,6 +2638,8 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
 		}
 	}
 
+	spin_unlock_irqrestore(&nesadapter->phy_lock, flags);
+
 	nesadapter->mac_sw_state[mac_number] = NES_MAC_SW_IDLE;
 }
 
Signature · 6 lines
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

applied, thanks for the quick response!

Signature · 6 lines
Roland Dreier <[email protected]> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html