[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191218.132601.160360469201947283.davem@davemloft.net>
Date: Wed, 18 Dec 2019 13:26:01 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: baijiaju1990@...il.com
Cc: thomas.lendacky@....com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: amd: xgbe: fix possible sleep-in-atomic-context
bugs in xgbe_powerdown()
From: Jia-Ju Bai <baijiaju1990@...il.com>
Date: Wed, 18 Dec 2019 22:01:02 +0800
> @@ -1257,17 +1257,18 @@ int xgbe_powerdown(struct net_device *netdev, unsigned int caller)
> netif_tx_stop_all_queues(netdev);
>
> xgbe_stop_timers(pdata);
> - flush_workqueue(pdata->dev_workqueue);
>
> hw_if->powerdown_tx(pdata);
> hw_if->powerdown_rx(pdata);
>
> - xgbe_napi_disable(pdata, 0);
> -
> pdata->power_down = 1;
>
> spin_unlock_irqrestore(&pdata->lock, flags);
>
> + flush_workqueue(pdata->dev_workqueue);
> +
> + xgbe_napi_disable(pdata, 0);
> +
Nope, this doesn't work at all.
You can't leave NAPI enabled, and thus packet processing, after the TX
and RX units of the chip have been powered down.
Powered by blists - more mailing lists