[PATCH linux 1/2] ncsi: Fix not releasing lock in ncsi_rcv_rsp()

OpenBMC Patches openbmc-patches at stwcx.xyz
Fri Jan 22 14:50:26 AEDT 2016


From: Cyril Bur <cyrilbur at gmail.com>

---
 net/ncsi/ncsi-rsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index 32df105..295f0f8 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -1154,7 +1154,6 @@ int ncsi_rcv_rsp(struct sk_buff *skb, struct net_device *dev,
 
 	nr->nr_rsp = skb;
 	if (!nr->nr_timer_enabled) {
-		spin_unlock_irqrestore(&ndp->ndp_req_lock, flags);
 		ret = -ENOENT;
 		goto out;
 	}
@@ -1163,6 +1162,7 @@ int ncsi_rcv_rsp(struct sk_buff *skb, struct net_device *dev,
 	ret = nrh->nrh_handler(nr);
 
 out:
+	spin_unlock_irqrestore(&ndp->ndp_req_lock, flags);
 	ncsi_free_req(nr, true, false);
 	return ret;
 }
-- 
2.6.4




More information about the openbmc mailing list