diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2020-08-10 08:44:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-21 13:15:16 +0200 |
commit | 240c89d0c46987fa95df02303eed8020999ffd71 (patch) | |
tree | ac079fbe9868c6f70c5dff31fcbcd09ad0bedb21 | |
parent | 3a1b4c0eda070d5f4f51d60c07d9cea6f2c3b9ef (diff) |
vdpa_sim: init iommu lock
[ Upstream commit 1e3e792650d2c0df8dd796906275b7c79e278664 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/vdpa/vdpa_sim/vdpa_sim.c | 1 |
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 8ac6f341dcc1..412fa85ba365 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -331,6 +331,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); |