WSL2-Linux-Kernel/drivers/dma/idxd
Li RongQing 1b08bf5a17 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-07-05 09:14:32 +02:00
..
Makefile dmaengine: idxd: Register dsa_bus_type before registering idxd sub-drivers 2023-11-20 11:08:25 +01:00
bus.c
cdev.c dmaengine: idxd: Fix the error handling path in idxd_cdev_register() 2022-06-09 10:23:14 +02:00
compat.c
device.c dmaengine: idxd: use spin_lock_irqsave before wait_event_lock_irq 2023-10-19 23:05:37 +02:00
dma.c dmaengine: idxd: add missing callback function to support DMA_INTERRUPT 2022-06-14 18:36:28 +02:00
idxd.h dmaengine: idxd: change bandwidth token to read buffers 2022-04-08 14:23:45 +02:00
init.c dmaengine: idxd: Set traffic class values in GRPCFG on DSA 2.0 2023-03-10 09:39:34 +01:00
irq.c dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list 2024-07-05 09:14:32 +02:00
perfmon.c dmaengine: idxd: Fix oops during rmmod on single-CPU platforms 2024-05-02 16:24:49 +02:00
perfmon.h
registers.h dmaengine: idxd: change bandwidth token to read buffers 2022-04-08 14:23:45 +02:00
submit.c dmaengine: idxd: fix missed completion on abort path 2021-12-22 09:32:41 +01:00
sysfs.c dmaengine: idxd: Set traffic class values in GRPCFG on DSA 2.0 2023-03-10 09:39:34 +01:00