linux/drivers/dma/idxd
Rex Zhang e271c0ba3f dmaengine: idxd: Move dma_free_coherent() out of spinlocked context
Task may be rescheduled within dma_free_coherent(). So dma_free_coherent()
can't be called between spin_lock() and spin_unlock() to avoid Call Trace:
    Call Trace:
    <TASK>
    dump_stack_lvl+0x37/0x50
    __might_resched+0x16a/0x1c0
    vunmap+0x2c/0x70
    __iommu_dma_free+0x96/0x100
    idxd_device_evl_free+0xd5/0x100 [idxd]
    device_release_driver_internal+0x197/0x200
    unbind_store+0xa1/0xb0
    kernfs_fop_write_iter+0x120/0x1c0
    vfs_write+0x2d3/0x400
    ksys_write+0x63/0xe0
    do_syscall_64+0x44/0xa0
    entry_SYSCALL_64_after_hwframe+0x6e/0xd8
Move it out of the context.

Fixes: 244da66cda ("dmaengine: idxd: setup event log configuration")
Signed-off-by: Rex Zhang <rex.zhang@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20231212022158.358619-2-rex.zhang@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2023-12-21 21:47:40 +05:30
..
bus.c Bus: Make remove callback return void tag 2021-07-27 19:12:14 +05:30
cdev.c dmaengine: idxd: Remove usage of the deprecated ida_simple_xx() API 2023-12-21 21:29:21 +05:30
compat.c dmaengine: idxd: use const struct bus_type * 2023-03-23 13:21:42 +01:00
debugfs.c dmanegine: idxd: add debugfs for event log dump 2023-04-12 23:18:45 +05:30
device.c dmaengine: idxd: Move dma_free_coherent() out of spinlocked context 2023-12-21 21:47:40 +05:30
dma.c dmaengine: idxd: add wq driver name support for accel-config user tool 2023-10-04 13:00:34 +05:30
idxd.h dmaengine: idxd: add wq driver name support for accel-config user tool 2023-10-04 13:00:34 +05:30
init.c dmaengine/idxd: Re-enable kernel workqueue under DMA API 2023-08-09 17:44:39 +02:00
irq.c dmaengine: idxd: rate limit printk in misc interrupt thread 2023-09-28 13:25:41 +05:30
Makefile dmaengine: idxd: Register dsa_bus_type before registering idxd sub-drivers 2023-09-28 13:26:34 +05:30
perfmon.c dmaengine:idxd: Use local64_try_cmpxchg in perfmon_pmu_event_update 2023-08-01 23:32:06 +05:30
perfmon.h dmaengine: idxd: Add IDXD performance monitor support 2021-04-25 21:46:12 +05:30
registers.h dmaengine: idxd: add per wq PRS disable 2023-04-12 23:18:46 +05:30
submit.c dmaengine: idxd: fix retry value to be constant for duration of function call 2022-04-20 17:24:42 +05:30
sysfs.c dmaengine: idxd: add wq driver name support for accel-config user tool 2023-10-04 13:00:34 +05:30