summaryrefslogtreecommitdiff
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2020-08-10 15:44:43 +0300
committerMichael S. Tsirkin <mst@redhat.com>2020-08-10 15:44:47 +0300
commit1e3e792650d2c0df8dd796906275b7c79e278664 (patch)
tree57f8c569ab0f44f37ba929be03de3cc326e4aedc /drivers/vdpa
parentc84f91e2622235bb742f9f20b8675cf095157026 (diff)
downloadlinux-1e3e792650d2c0df8dd796906275b7c79e278664.tar.xz
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 <rong.a.chen@intel.com> Cc: Max Gurtovoy <maxg@mellanox.com> Fixes: 0ea9ee430e74 ("vdpasim: protect concurrent access to iommu iotlb") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r--drivers/vdpa/vdpa_sim/vdpa_sim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index df3224b138ee..604d9d25ca47 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -358,6 +358,7 @@ static struct vdpasim *vdpasim_create(void)
INIT_WORK(&vdpasim->work, vdpasim_work);
spin_lock_init(&vdpasim->lock);
+ spin_lock_init(&vdpasim->iommu_lock);
dev = &vdpasim->vdpa.dev;
dev->coherent_dma_mask = DMA_BIT_MASK(64);