diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2016-04-18 22:19:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-21 22:35:07 +0300 |
commit | 08d9910c3408531473766ec4d8b288e8ee2fe500 (patch) | |
tree | 2558b0c5b2c5fbdad0a4c8001c5e964588ade43a /drivers/net/ethernet/emulex | |
parent | 7f348a60762afd4cd0e4e7fa14cfa66331b7c30e (diff) | |
download | linux-08d9910c3408531473766ec4d8b288e8ee2fe500.tar.xz |
benet: be_resume needs to protect be_open with rtnl_lock
be_open calls down to functions which expects rtnl lock to be held.
Cc: Sathya Perla <sathya.perla@broadcom.com>
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>
Cc: Padmanabh Ratnakar <padmanabh.ratnakar@broadcom.com>
Cc: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Cc: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 536686476369..ed98ef1ecac3 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -4890,11 +4890,13 @@ 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); |