sst-linux/drivers/dma/idxd
Li RongQing 83163667d8 dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list
[ Upstream commit e3215deca4520773cd2b155bed164c12365149a7 ]

Use list_for_each_entry_safe() to allow iterating through the list and
deleting the entry in the iteration process. The descriptor is freed via
idxd_desc_complete() and there's a slight chance may cause issue for
the list iterator when the descriptor is reused by another thread
without it being deleted from the list.

Fixes: 16e19e1122 ("dmaengine: idxd: Fix list corruption in description completion")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20240603012444.11902-1-lirongqing@baidu.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-27 13:46:20 +02:00
..
bus.c
cdev.c dmaengine: idxd: add a write() method for applications to submit work 2024-05-17 11:56:23 +02:00
compat.c
device.c
dma.c
idxd.h dmaengine: idxd: add a new security check to deal with a hardware erratum 2024-05-17 11:56:23 +02:00
init.c dmaengine: idxd: add a new security check to deal with a hardware erratum 2024-05-17 11:56:23 +02:00
irq.c dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list 2024-06-27 13:46:20 +02:00
Makefile
perfmon.c
perfmon.h
registers.h
submit.c
sysfs.c dmaengine: idxd: add a write() method for applications to submit work 2024-05-17 11:56:23 +02:00