linux/drivers/dma/idxd
Dave Jiang 8affd8a4b5 dmaengine: idxd: fix missed completion on abort path
Ming reported that with the abort path of the descriptor submission, there
can be a window where a completed descriptor can be missed to be completed
by the irq completion thread:

CPU A				CPU B
Submit (successful)

Submit (fail)
				irq_process_work_list() // empty

llist_abort_desc()
// remove all descs from pending list

				irq_process_pending_llist() // empty
				exit idxd_wq_thread() with no processing

Add opportunistic descriptor completion in the abort path in order to
remove the missed completion.

Fixes: 6b4b87f2c3 ("dmaengine: idxd: fix submission race window")
Reported-by: Ming Li <ming4.li@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163898288714.443911.16084982766671976640.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-12-13 11:10:41 +05:30
..
bus.c Bus: Make remove callback return void tag 2021-07-27 19:12:14 +05:30
cdev.c dmaengine: idxd: remove interrupt disable for dev_lock 2021-08-29 19:14:20 +05:30
compat.c dmaengine: idxd: Fix a possible NULL pointer dereference 2021-08-02 12:35:10 +05:30
device.c dmaengine: idxd: cleanup completion record allocation 2021-10-28 22:54:44 +05:30
dma.c dmaengine: idxd: fix resource leak on dmaengine driver disable 2021-10-28 22:54:45 +05:30
idxd.h dmaengine: idxd: cleanup completion record allocation 2021-10-28 22:54:44 +05:30
init.c dmanegine: idxd: fix resource free ordering on driver removal 2021-10-25 11:51:22 +05:30
irq.c dmaengine: idxd: fix calling wq quiesce inside spinlock 2021-11-22 12:29:50 +05:30
Makefile dmaengine: idxd: move dsa_drv support to compatible mode 2021-07-21 10:09:16 +05:30
perfmon.c dmaengine: idxd: Add IDXD performance monitor support 2021-04-25 21:46:12 +05:30
perfmon.h dmaengine: idxd: Add IDXD performance monitor support 2021-04-25 21:46:12 +05:30
registers.h dmaengine: idxd: add halt interrupt support 2021-10-25 12:09:15 +05:30
submit.c dmaengine: idxd: fix missed completion on abort path 2021-12-13 11:10:41 +05:30
sysfs.c dmaengine: idxd: remove interrupt disable for dev_lock 2021-08-29 19:14:20 +05:30