Commit 54b210c9 authored by Jason Wang's avatar Jason Wang Committed by Greg Kroah-Hartman
Browse files

vdpasim: fix memory leak when freeing IOTLBs



[ Upstream commit 0b7a04a3 ]

After commit bda324fd ("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: bda324fd ("vdpasim: control virtqueue support")
Cc: Gautam Dawar <gautam.dawar@xilinx.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Message-Id: <20221213090717.61529-1-jasowang@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarGautam Dawar <gautam.dawar@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8fe12680
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment