On Tue, Sep 10, 2024 at 10:46:07AM -0400, Sean Anderson wrote:
[ Upstream commit 858430db28a5f5a11f8faa3a6fa805438e6f0851 ]
axienet_dma_err_handler can race with axienet_stop in the following manner:
CPU 1 CPU 2 ====================== ================== axienet_stop() napi_disable() axienet_dma_stop() axienet_dma_err_handler() napi_disable() axienet_dma_stop() axienet_dma_start() napi_enable() cancel_work_sync() free_irq()
Fix this by setting a flag in axienet_stop telling axienet_dma_err_handler not to bother doing anything. I chose not to use disable_work_sync to allow for easier backporting.
Signed-off-by: Sean Anderson sean.anderson@linux.dev Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Link: https://patch.msgid.link/20240903175141.4132898-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski kuba@kernel.org [ Adjusted to apply before dmaengine support ] Signed-off-by: Sean Anderson sean.anderson@linux.dev
This patch is adjusted to apply to v6.6 kernels and earlier, which do not contain commit 6a91b846af85 ("net: axienet: Introduce dmaengine support").
Applied to 6.6.y and 6.1.y, but nothing older as it didn't apply to 5.15.y :(
thanks,
greg k-h