vfio: avoid possible overflow in vfio_iommu_type1_pin_pages
authorYan Zhao <yan.y.zhao@intel.com>
Wed, 8 Apr 2020 07:12:34 +0000 (03:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2020 06:16:44 +0000 (08:16 +0200)
commit1ba98cb6e7cd7ea484ef7ddb8ca1c467241bca6b
tree6d3b35f447bfb5ea15277e00f2d339cce4d8757a
parent80155a04d5a132b98c135eae332d600b4f53546e
vfio: avoid possible overflow in vfio_iommu_type1_pin_pages

commit 0ea971f8dcd6dee78a9a30ea70227cf305f11ff7 upstream.

add parentheses to avoid possible vaddr overflow.

Fixes: a54eb55045ae ("vfio iommu type1: Add support for mediated devices")
Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vfio/vfio_iommu_type1.c