WSL2-Linux-Kernel/drivers/pci
Bjorn Helgaas ca620723d4 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: e8de1481fd ("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>
2016-04-25 15:58:26 -05:00
..
host Revert "PCI: dra7xx: Mark driver as broken" 2016-03-22 07:50:11 -05:00
hotplug s390/pci: remove pdev pointer from arch data 2016-02-23 08:56:16 +01:00
pcie PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
Kconfig PCI: Restore inclusion of pci/hotplug Kconfig 2016-03-21 07:33:34 -05:00
Makefile ARC: Add PCI support 2016-03-10 14:44:13 -06:00
access.c PCI: Sleep rather than busy-wait for VPD access completion 2016-03-10 14:24:48 -06:00
ats.c
bus.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
host-bridge.c
hotplug-pci.c
htirq.c
iov.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
irq.c
msi.c PCI changes for the v4.5 merge window: 2016-01-21 11:52:16 -08:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Power management and ACPI updates for v4.5-rc1 2016-01-12 20:25:09 -08:00
pci-driver.c PCI / PM: Tune down retryable runtime suspend error messages 2015-12-02 15:24:21 +01:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-stub.c
pci-sysfs.c PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive() 2016-04-25 15:58:26 -05:00
pci.c PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
pci.h PCI: Fold struct pci_vpd_pci22 into struct pci_vpd 2016-02-29 17:47:36 -06:00
probe.c Merge branch 'pci/resource' into next 2016-03-15 08:56:28 -05:00
proc.c
quirks.c Merge branches 'pci/aer', 'pci/enumeration', 'pci/kconfig', 'pci/misc', 'pci/virtualization' and 'pci/vpd' into next 2016-03-15 08:55:02 -05:00
remove.c Merge branch 'pci/resource' into next 2016-03-15 08:56:28 -05:00
rom.c PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY 2016-03-12 06:00:29 -06:00
search.c
setup-bus.c PCI: Remove includes of empty asm-generic/pci-bridge.h 2016-02-05 16:28:36 -06:00
setup-irq.c
setup-res.c PCI: Don't assign or reassign immutable resources 2016-03-08 12:14:31 -06:00
slot.c
syscall.c
vc.c
vpd.c
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-02-15 14:34:57 +00:00