1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/xilinx
Sean Anderson 858430db28 net: xilinx: axienet: Fix race in axienet_stop
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: 8a3b7a252d ("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>
2024-09-04 17:07:12 -07:00
..
Kconfig net: axienet: Introduce dmaengine support 2023-11-20 17:52:22 -08:00
ll_temac.h net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
ll_temac_main.c net: ll_temac: platform_get_resource replaced by wrong function 2024-03-25 19:46:56 -07:00
ll_temac_mdio.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xilinx_axienet.h net: xilinx: axienet: Fix race in axienet_stop 2024-09-04 17:07:12 -07:00
xilinx_axienet_main.c net: xilinx: axienet: Fix race in axienet_stop 2024-09-04 17:07:12 -07:00
xilinx_axienet_mdio.c net: axienet: Fix kernel doc warnings 2024-03-29 12:41:22 -07:00
xilinx_emaclite.c net: emaclite: Use devm_platform_get_and_ioremap_resource() in xemaclite_of_probe() 2024-02-09 12:27:43 -08:00