[PATCH linux] net/ncsi: Fix possible deadlock caught with lockdep

OpenBMC Patches openbmc-patches at stwcx.xyz
Thu Feb 25 14:20:26 AEDT 2016


From: Cyril Bur <cyrilbur at gmail.com>

Signed-off-by: Cyril Bur <cyrilbur at gmail.com>
---
 net/ncsi/ncsi-manage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 24ff6c2..ef1de7f 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -907,10 +907,10 @@ void ncsi_stop_dev(struct ncsi_dev *nd)
 	struct ncsi_dev_priv *ndp = TO_NCSI_DEV_PRIV(nd);
 	struct ncsi_package *tmp, *np;
 
-	spin_lock(&ndp->ndp_package_lock);
+	spin_lock_bh(&ndp->ndp_package_lock);
 	list_for_each_entry_safe(np, tmp, &ndp->ndp_packages, np_node)
 		ncsi_release_package(np);
-	spin_unlock(&ndp->ndp_package_lock);
+	spin_unlock_bh(&ndp->ndp_package_lock);
 }
 EXPORT_SYMBOL_GPL(ncsi_stop_dev);
 
-- 
2.7.1




More information about the openbmc mailing list