]> xenbits.xensource.com Git - arm/linux.git/commit
xen/privcmd: fix error handling in mmap-resource processing
authorJan Beulich <jbeulich@suse.com>
Wed, 22 Sep 2021 10:17:48 +0000 (12:17 +0200)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Tue, 5 Oct 2021 21:13:35 +0000 (14:13 -0700)
commitbca5bc0229a646333f50e2f1ea72293c08e8efcf
tree110b28f3f5f01ac9689893a7c3a0e8ebaf1e386b
parent69117aaf07f7197d1f1a789ad0e6e1a919ff531d
xen/privcmd: fix error handling in mmap-resource processing

xen_pfn_t is the same size as int only on 32-bit builds (and not even
on Arm32). Hence pfns[] can't be used directly to read individual error
values returned from xen_remap_domain_mfn_array(); every other error
indicator would be skipped/ignored on 64-bit.

Fixes: 3ad0876554ca ("xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE")
Cc: stable@vger.kernel.org
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/aa6d6a67-6889-338a-a910-51e889f792d5@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
(cherry picked from commit e11423d6721dd63b23fb41ade5e8d0b448b17780)
drivers/xen/privcmd.c