All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ibmvnic: Call napi_disable instead of napi_enable in failure path
@ 2017-02-10 18:29 Nathan Fontenot
  2017-02-12  2:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Fontenot @ 2017-02-10 18:29 UTC (permalink / raw)
  To: netdev; +Cc: jallen, tlfalcon

The failure path in ibmvnic_open() mistakenly makes a second call
to napi_enable instead of calling napi_disable. This can result
in a BUG_ON for any queues that were enabled in the previous call
to napi_enable.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index c125966..a024141 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -505,7 +505,7 @@ static int ibmvnic_open(struct net_device *netdev)
 	adapter->rx_pool = NULL;
 rx_pool_arr_alloc_failed:
 	for (i = 0; i < adapter->req_rx_queues; i++)
-		napi_enable(&adapter->napi[i]);
+		napi_disable(&adapter->napi[i]);
 alloc_napi_failed:
 	return -ENOMEM;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ibmvnic: Call napi_disable instead of napi_enable in failure path
  2017-02-10 18:29 [PATCH] ibmvnic: Call napi_disable instead of napi_enable in failure path Nathan Fontenot
@ 2017-02-12  2:24 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-02-12  2:24 UTC (permalink / raw)
  To: nfont; +Cc: netdev, jallen, tlfalcon

From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date: Fri, 10 Feb 2017 13:29:06 -0500

> The failure path in ibmvnic_open() mistakenly makes a second call
> to napi_enable instead of calling napi_disable. This can result
> in a BUG_ON for any queues that were enabled in the previous call
> to napi_enable.
> 
> Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-12  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10 18:29 [PATCH] ibmvnic: Call napi_disable instead of napi_enable in failure path Nathan Fontenot
2017-02-12  2:24 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.