Commit e271c0b
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: 244da66 ("dmaengine: idxd: setup event log configuration")
Signed-off-by: Rex Zhang <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Fenghua Yu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>1 parent 3b08b37 commit e271c0b
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
805 | 808 | | |
806 | 809 | | |
807 | 810 | | |
| |||
822 | 825 | | |
823 | 826 | | |
824 | 827 | | |
825 | | - | |
826 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
827 | 832 | | |
828 | 833 | | |
829 | 834 | | |
| 835 | + | |
| 836 | + | |
830 | 837 | | |
831 | 838 | | |
832 | 839 | | |
| |||
0 commit comments