linux-stable/drivers/vdpa/vdpa_sim
Jason Wang 54b210c90d vdpasim: fix memory leak when freeing IOTLBs
[ Upstream commit 0b7a04a30e ]

After commit bda324fd03 ("vdpasim: control virtqueue support"),
vdpasim->iommu became an array of IOTLB, so we should clean the
mappings of each free one by one instead of just deleting the ranges
in the first IOTLB which may leak maps.

Fixes: bda324fd03 ("vdpasim: control virtqueue support")
Cc: Gautam Dawar <gautam.dawar@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221213090717.61529-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gautam Dawar <gautam.dawar@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-12 12:00:34 +01:00
..
Makefile vdpa: add vdpa simulator for block device 2021-05-03 04:55:53 -04:00
vdpa_sim.c vdpasim: fix memory leak when freeing IOTLBs 2023-01-12 12:00:34 +01:00
vdpa_sim.h vdpa_sim: Implement suspend vdpa op 2022-08-11 04:31:15 -04:00
vdpa_sim_blk.c vdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init() 2023-01-12 12:00:33 +01:00
vdpa_sim_net.c vdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init() 2023-01-12 12:00:33 +01:00