mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: stmmac: stop DMA before freeing descriptors on open
In __stmmac_open() and stmmac_xdp_open(), the DMA engine is started before stmmac_request_irq() is called. If the IRQ request fails, the clean-up paths free the DMA descriptor rings via dma_free_coherent() without stopping the DMA engine first. With the DMA engine still running, hardware may continue to access the descriptor ring memory after it has been freed. Add stmmac_stop_all_dma() to both error paths, matching the teardown order in __stmmac_release(). Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: ZhaoJinming <zhaojinming@uniontech.com> Link: https://patch.msgid.link/32EB352EB66D74E7+20260827025415.2684733-1-zhaojinming@uniontech.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
1bb784eb6e
commit
25c1f61110
1 changed files with 4 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue