This is a note to let you know that I've just added the patch titled ibmvnic: avoid calling napi_disable() twice to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ibmvnic-avoid-calling-napi_disable-twice.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 0775ebc4cf8554bdcd2c212669a0868ab68df5c0 Mon Sep 17 00:00:00 2001 From: Lijun Pan <lijunp213@xxxxxxxxx> Date: Wed, 14 Apr 2021 02:46:14 -0500 Subject: ibmvnic: avoid calling napi_disable() twice From: Lijun Pan <lijunp213@xxxxxxxxx> commit 0775ebc4cf8554bdcd2c212669a0868ab68df5c0 upstream. __ibmvnic_open calls napi_disable without checking whether NAPI polling has already been disabled or not. This could cause napi_disable being called twice, which could generate deadlock. For example, the first napi_disable will spin until NAPI_STATE_SCHED is cleared by napi_complete_done, then set it again. When napi_disable is called the second time, it will loop infinitely because no dev->poll will be running to clear NAPI_STATE_SCHED. To prevent above scenario from happening, call ibmvnic_napi_disable() which checks if napi is disabled or not before calling napi_disable. Fixes: bfc32f297337 ("ibmvnic: Move resource initialization to its own routine") Suggested-by: Thomas Falcon <tlfalcon@xxxxxxxxxxxxx> Signed-off-by: Lijun Pan <lijunp213@xxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1180,8 +1180,7 @@ static int __ibmvnic_open(struct net_dev rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_UP); if (rc) { - for (i = 0; i < adapter->req_rx_queues; i++) - napi_disable(&adapter->napi[i]); + ibmvnic_napi_disable(adapter); release_resources(adapter); return rc; } Patches currently in stable-queue which might be from lijunp213@xxxxxxxxx are queue-5.11/ibmvnic-remove-duplicate-napi_schedule-call-in-open-function.patch queue-5.11/ibmvnic-avoid-calling-napi_disable-twice.patch queue-5.11/ibmvnic-remove-duplicate-napi_schedule-call-in-do_reset-function.patch queue-5.11/ibmvnic-correctly-use-dev_consume-free_skb_irq.patch