[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452123571-19140-5-git-send-email-hannes@stressinduktion.org>
Date: Thu, 7 Jan 2016 00:39:27 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: netdev@...r.kernel.org
Cc: jesse@...nel.org, Sathya Perla <sathya.perla@...gotech.com>,
Ajit Khaparde <ajit.khaparde@...gotech.com>,
Padmanabh Ratnakar <padmanabh.ratnakar@...gotech.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@...gotech.com>
Subject: [PATCH net-next v3 4/8] benet: add rtnl lock protection around be_open in be_resume
Cc: Sathya Perla <sathya.perla@...gotech.com>
Cc: Ajit Khaparde <ajit.khaparde@...gotech.com>
Cc: Padmanabh Ratnakar <padmanabh.ratnakar@...gotech.com>
Cc: Sriharsha Basavapatna <sriharsha.basavapatna@...gotech.com>
Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
---
drivers/net/ethernet/emulex/benet/be_main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index f99de3657ce3b5..3200f48ddd5a68 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4846,11 +4846,12 @@ static int be_resume(struct be_adapter *adapter)
if (status)
return status;
- if (netif_running(netdev)) {
+ rtnl_lock();
+ if (netif_running(netdev))
status = be_open(netdev);
- if (status)
- return status;
- }
+ rtnl_unlock();
+ if (status)
+ return status;
netif_device_attach(netdev);
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists