aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2022-09-30 13:34:08 +0200
committerMark Brown <broonie@kernel.org>2022-09-30 12:56:29 +0100
commit8e9204cddcc3fea9affcfa411715ba4f66e97587 (patch)
treef647a8b9917e8efb5f04a0a25f1290f4410b6041 /drivers/spi/spi-pxa2xx.c
parentspi: spi-gxp: Use devm_platform_ioremap_resource() (diff)
downloadlinux-dev-8e9204cddcc3fea9affcfa411715ba4f66e97587.tar.xz
linux-dev-8e9204cddcc3fea9affcfa411715ba4f66e97587.zip
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: 0c17ba73c08f ("spi: Fix cache corruption due to DMA/PIO overlap") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20220930113408.19720-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
0 files changed, 0 insertions, 0 deletions