diff mbox series

[net,v2,1/3] ibmvnic: fix call_netdevice_notifiers in do_reset

Message ID 20201120224013.46891-2-ljp@linux.ibm.com
State New
Headers show
Series ibmvnic: fixes in reset path | expand

Commit Message

Lijun Pan Nov. 20, 2020, 10:40 p.m. UTC
When netdev_notify_peers was substituted in
commit 986103e7920c ("net/ibmvnic: Fix RTNL deadlock during device reset"),
call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev) was missed.
Fix it now.

Fixes: 986103e7920c ("net/ibmvnic: Fix RTNL deadlock during device reset")
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
---
v2: split from v1's 1/2

 drivers/net/ethernet/ibm/ibmvnic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

drt Nov. 20, 2020, 10:52 p.m. UTC | #1
On 2020-11-20 14:40, Lijun Pan wrote:
> When netdev_notify_peers was substituted in
> commit 986103e7920c ("net/ibmvnic: Fix RTNL deadlock during device 
> reset"),
> call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev) was missed.
> Fix it now.
> 
> Fixes: 986103e7920c ("net/ibmvnic: Fix RTNL deadlock during device 
> reset")
> Signed-off-by: Lijun Pan <ljp@linux.ibm.com>

Reviewed-by: Dany Madden <drt@linux.ibm.com>

> ---
> v2: split from v1's 1/2
> 
>  drivers/net/ethernet/ibm/ibmvnic.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
> b/drivers/net/ethernet/ibm/ibmvnic.c
> index da15913879f8..eface3543b2c 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -2074,8 +2074,10 @@ 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) {
>  		call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
> +		call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
> +	}
> 
>  	rc = 0;
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index da15913879f8..eface3543b2c 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2074,8 +2074,10 @@  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) {
 		call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
+		call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
+	}
 
 	rc = 0;