In the Linux kernel, the following vulnerability has been resolved: spi: rockchip-sfc: skip DMA cleanup in PIO mode With rockchip,sfc-no-dma, probe skips allocating and mapping the transfer buffer. However, controller registration failure and driver removal still call dma_unmap_single() for that nonexistent mapping. Guard the DMA mapping and buffer cleanup with use_dma. Keep the existing cleanup for allocation and mapping failures on the DMA path. This issue was identified during our ongoing static-analysis research while reviewing kernel code.
https://git.kernel.org/stable/c/926f9c44a76fe9e722180d0804c607c6cf1ebbb4
https://git.kernel.org/stable/c/697cb8e7095cef461965dc143b0b6f77164b1634
https://git.kernel.org/stable/c/66d30f7c9062e5e5bbd2c6999c371fed0cac5cf6