]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: atcspi200: fix use-after-free when driver unbind
authorFelix Gu <ustc.gu@gmail.com>
Thu, 16 Apr 2026 16:27:54 +0000 (00:27 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 26 Apr 2026 23:32:54 +0000 (08:32 +0900)
commit565bdf45125a05aa8f622f58f598283f46ba43f4
treef5432e97f1956cab04ec8126afef22e12969d71c
parent254f49634ee16a731174d2ae34bc50bd5f45e731
spi: atcspi200: fix use-after-free when driver unbind

DMA resource is initialized after SPI controller registration. So
when driver unbind, this can trigger a use-after-free when DMA is
torn down while the controller is still alive and triggers DMA transfers.

Fixes: 34e3815ea459 ("spi: atcspi200: Add ATCSPI200 SPI controller driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260417-atcspi-v1-1-854831667d63@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-atcspi200.c