Skip to content

Commit 1e3e792

Browse files
committed
vdpa_sim: init iommu lock
The patch adding the iommu lock did not initialize it. The struct is zero-initialized so this is mostly a problem when using lockdep. Reported-by: kernel test robot <[email protected]> Cc: Max Gurtovoy <[email protected]> Fixes: 0ea9ee4 ("vdpasim: protect concurrent access to iommu iotlb") Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent c84f91e commit 1e3e792

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/vdpa/vdpa_sim/vdpa_sim.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ static struct vdpasim *vdpasim_create(void)
358358

359359
INIT_WORK(&vdpasim->work, vdpasim_work);
360360
spin_lock_init(&vdpasim->lock);
361+
spin_lock_init(&vdpasim->iommu_lock);
361362

362363
dev = &vdpasim->vdpa.dev;
363364
dev->coherent_dma_mask = DMA_BIT_MASK(64);

0 commit comments

Comments
 (0)