[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452514651-15445-5-git-send-email-hannes@stressinduktion.org>
Date: Mon, 11 Jan 2016 13:17:25 +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 v5 04/10] 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
Powered by blists - more mailing lists