Skip to content

Commit

Permalink
vdpa_sim: init iommu lock
Browse files Browse the repository at this point in the history
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: 0ea9ee4 ("vdpasim: protect concurrent access to iommu iotlb")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
mstsirkin committed Aug 10, 2020
1 parent c84f91e commit 1e3e792
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/vdpa/vdpa_sim/vdpa_sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1e3e792

Please sign in to comment.