PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Apr 2017 12:25:50 +0000 (13:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:30:17 +0000 (14:30 +0200)
commit5f36c8b4e4a336fdf797d1e4a59a429f541befdf
treed8875a81eb723c67fa0b23898229311dda447ae1
parent6384f782a69cf93a8a59322e1b6cf29f27fa0c8f
PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms

commit 6bccc7f426abd640f08d8c75fb22f99483f201b4 upstream.

In the PCI_MMAP_PROCFS case when the address being passed by the user is a
'user visible' resource address based on the bus window, and not the actual
contents of the resource, that's what we need to be checking it against.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/pci-sysfs.c