linux-imx/drivers/dma/idxd
Li RongQing faa35db78b dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list
[ Upstream commit e3215deca4 ]

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:49:08 +02:00
..
bus.c Bus: Make remove callback return void tag 2021-07-27 19:12:14 +05:30
cdev.c dmaengine: idxd: Avoid unnecessary destruction of file_ida 2024-06-12 11:12:25 +02:00
compat.c dmaengine: idxd: use const struct bus_type * 2023-03-23 13:21:42 +01:00
debugfs.c dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue 2024-05-02 16:32:48 +02:00
device.c dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue 2024-05-02 16:32:48 +02:00
dma.c dmaengine/idxd: Re-enable kernel workqueue under DMA API 2023-08-09 17:44:39 +02:00
idxd.h dmaengine: idxd: add a new security check to deal with a hardware erratum 2024-05-17 12:02:38 +02:00
init.c dmaengine: idxd: add a new security check to deal with a hardware erratum 2024-05-17 12:02:38 +02:00
irq.c dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list 2024-06-27 13:49:08 +02:00
Makefile dmaengine: idxd: Register dsa_bus_type before registering idxd sub-drivers 2023-11-20 11:59:25 +01:00
perfmon.c dmaengine: idxd: Fix oops during rmmod on single-CPU platforms 2024-05-02 16:32:48 +02:00
perfmon.h dmaengine: idxd: Add IDXD performance monitor support 2021-04-25 21:46:12 +05:30
registers.h VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-17 12:02:38 +02:00
submit.c dmaengine: idxd: Protect int_handle field in hw descriptor 2024-01-10 17:16:59 +01:00
sysfs.c dmaengine: idxd: add a write() method for applications to submit work 2024-05-17 12:02:39 +02:00