]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
(powerpc/512) Fix possible `dma_unmap_single()` on uninitialized pointer
authorThomas Fourier <fourier.thomas@gmail.com>
Tue, 10 Jun 2025 14:29:11 +0000 (16:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:21 +0000 (16:28 +0200)
commit5a9b218083232e58f18613ba0f012ae02b6ae033
tree6f5de474fa0fb0f3bd0424980b0fc6880056303a
parentffa3a8007d2fd028f345d319f8fa1fadd2e882b9
(powerpc/512) Fix possible `dma_unmap_single()` on uninitialized pointer

[ Upstream commit 760b9b4f6de9a33ca56a05f950cabe82138d25bd ]

If the device configuration fails (if `dma_dev->device_config()`),
`sg_dma_address(&sg)` is not initialized and the jump to `err_dma_prep`
leads to calling `dma_unmap_single()` on `sg_dma_address(&sg)`.

Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250610142918.169540-2-fourier.thomas@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/512x/mpc512x_lpbfifo.c