summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-04-08 02:15:14 +0200
committerBjorn Helgaas <bhelgaas@google.com>2016-04-25 22:58:26 +0200
commitca620723d4ff9ea7ed484eab46264c3af871b9ae (patch)
tree545bd1ccb241a7416e20ed02038229f5f027b917 /arch
parentLinux 4.6-rc2 (diff)
downloadlinux-ca620723d4ff9ea7ed484eab46264c3af871b9ae.tar.xz
linux-ca620723d4ff9ea7ed484eab46264c3af871b9ae.zip
PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive()
iomem_is_exclusive() requires a CPU physical address, but on some arches we supplied a PCI bus address instead. On most arches, pci_resource_to_user(res) returns "res->start", which is a CPU physical address. But on microblaze, mips, powerpc, and sparc, it returns the PCI bus address corresponding to "res->start". The result is that pci_mmap_resource() may fail when it shouldn't (if the bus address happens to match an existing resource), or it may succeed when it should fail (if the resource is exclusive but the bus address doesn't match it). Call iomem_is_exclusive() with "res->start", which is always a CPU physical address, not the result of pci_resource_to_user(). Fixes: e8de1481fd71 ("resource: allow MMIO exclusivity for device drivers") Suggested-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions