diff options
author | Gerald Schaefer | 2019-01-16 20:11:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-02-06 17:30:11 +0100 |
commit | 7e3251667a1f0cafd0c278b0159e48585e5b6c68 (patch) | |
tree | 3186a1a265d653cc95c3d52b3e040c9b15efa34e /include/crypto/sha1_base.h | |
parent | fs/dcache: Fix incorrect nr_dentry_unused accounting in shrink_dcache_sb() (diff) | |
download | kernel-qcow2-linux-7e3251667a1f0cafd0c278b0159e48585e5b6c68.tar.gz kernel-qcow2-linux-7e3251667a1f0cafd0c278b0159e48585e5b6c68.tar.xz kernel-qcow2-linux-7e3251667a1f0cafd0c278b0159e48585e5b6c68.zip |
iommu/vt-d: Fix memory leak in intel_iommu_put_resv_regions()
commit 198bc3252ea3a45b0c5d500e6a5b91cfdd08f001 upstream.
Commit 9d3a4de4cb8d ("iommu: Disambiguate MSI region types") changed
the reserved region type in intel_iommu_get_resv_regions() from
IOMMU_RESV_RESERVED to IOMMU_RESV_MSI, but it forgot to also change
the type in intel_iommu_put_resv_regions().
This leads to a memory leak, because now the check in
intel_iommu_put_resv_regions() for IOMMU_RESV_RESERVED will never
be true, and no allocated regions will be freed.
Fix this by changing the region type in intel_iommu_put_resv_regions()
to IOMMU_RESV_MSI, matching the type of the allocated regions.
Fixes: 9d3a4de4cb8d ("iommu: Disambiguate MSI region types")
Cc: <stable@vger.kernel.org> # v4.11+
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/crypto/sha1_base.h')
0 files changed, 0 insertions, 0 deletions