Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spi: Ensure that sg_table won't be used after being freed
SPI code checks for non-zero sgt->orig_nents to determine if the buffer has been DMA-mapped. Ensure that sg_table is really zeroed after free to avoid potential NULL pointer dereference if the given SPI xfer object is reused again without being DMA-mapped. Fixes: 0c17ba7 ("spi: Fix cache corruption due to DMA/PIO overlap") Signed-off-by: Marek Szyprowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
- Loading branch information