From: Hannes Frederic Sowa Date: Mon, 18 Apr 2016 19:19:42 +0000 (+0200) Subject: benet: be_resume needs to protect be_open with rtnl_lock X-Git-Tag: MMI-PSA29.97-13-9~7934^2~224^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=08d9910c3408531473766ec4d8b288e8ee2fe500;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Cc: Ajit Khaparde Cc: Padmanabh Ratnakar Cc: Sriharsha Basavapatna Cc: Somnath Kotur Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller --- 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);