Skip to content
Commit 4d43acb1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Vinod Koul
Browse files

dmaengine: at_xdmac: fix potential Oops in at_xdmac_prep_interleaved()



There are two place if the at_xdmac_interleaved_queue_desc() fails which
could lead to a NULL dereference where "first" is NULL and we call
list_add_tail(&first->desc_node, ...).  In the first caller, the return
is not checked so add a check for that.  In the next caller, the return
is checked but if it fails on the first iteration through the loop then
it will lead to a NULL pointer dereference.

Fixes: 4e538578 ("dmaengine: at_xdmac: handle numf > 1")
Fixes: 62b5cb75 ("dmaengine: at_xdmac: fix memory leak in interleaved mode")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Link: https://lore.kernel.org/r/21282b66-9860-410a-83df-39c17fcf2f1b@kili.mountain


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 38de368a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment