OSDN Git Service

ibmvnic: Do not notify peers on parameter change resets
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Wed, 11 Apr 2018 15:09:38 +0000 (10:09 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Apr 2018 01:51:53 +0000 (21:51 -0400)
When attempting to change the driver parameters, such as the MTU
value or number of queues, do not call netdev_notify_peers().
Doing so will deadlock on the rtnl_lock.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index d35f29d..f4a56a3 100644 (file)
@@ -1843,7 +1843,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
        for (i = 0; i < adapter->req_rx_queues; i++)
                napi_schedule(&adapter->napi[i]);
 
-       if (adapter->reset_reason != VNIC_RESET_FAILOVER)
+       if (adapter->reset_reason != VNIC_RESET_FAILOVER &&
+           adapter->reset_reason != VNIC_RESET_CHANGE_PARAM)
                netdev_notify_peers(netdev);
 
        netif_carrier_on(netdev);