]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: idxd: fix possible wrong descriptor completion in llist_abort_desc()
authorTuo Li <islituo@gmail.com>
Tue, 6 Jan 2026 03:24:28 +0000 (11:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 11:25:55 +0000 (13:25 +0200)
commit0e4f43779d550e559be13a5cdb763bad92c4cc99
tree1ea5fa2adfd429b6aa2fc00e5bef3b26a8cf01f9
parent7a5482f5ce891decbf36f2e6fab1e9fc4a76a684
dmaengine: idxd: fix possible wrong descriptor completion in llist_abort_desc()

[ Upstream commit e1c9866173c5f8521f2d0768547a01508cb9ff27 ]

At the end of this function, d is the traversal cursor of flist, but the
code completes found instead. This can lead to issues such as NULL pointer
dereferences, double completion, or descriptor leaks.

Fix this by completing d instead of found in the final
list_for_each_entry_safe() loop.

Fixes: aa8d18becc0c ("dmaengine: idxd: add callback support for iaa crypto")
Signed-off-by: Tuo Li <islituo@gmail.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260106032428.162445-1-islituo@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/idxd/submit.c