android_kernel_motorola_sm6375/drivers/pci
Repository files (latest commit first)
Filename Latest commit message Latest commit date
James Sewart b3224bf307 PCI: Fix pci_add_dma_alias() bitmask size
[ Upstream commit f8bf2aeb651b3460a4b36fd7ba1ba1d31777d35c ]

The number of possible devfns is 256, but pci_add_dma_alias() allocated a
bitmap of size 255.  Fix this off-by-one error.

This fixes commits 338c3149a2 ("PCI: Add support for multiple DMA
aliases") and c663579273 ("PCI: Allocate dma_alias_mask with
bitmap_zalloc()"), but I doubt it was possible to see a problem because
it takes 4 64-bit longs (or 8 32-bit longs) to hold 255 bits, and
bitmap_zalloc() doesn't save the 255-bit size anywhere.

[bhelgaas: commit log, move #define to drivers/pci/pci.h, include loop
limit fix from Qian Cai:
https://lore.kernel.org/r/[email protected]]
Signed-off-by: James Sewart <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Logan Gunthorpe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-02-24 08:36:24 +01:00
..
controller PCI: tegra: Fix afi_pex2_ctrl reg offset for Tegra30 2020-02-14 16:34:09 -05:00
endpoint
hotplug
pcie PCI/AER: Initialize aer_fifo 2020-02-14 16:34:09 -05:00
switch PCI/switchtec: Fix vep_vector_number ioread width 2020-02-14 16:34:09 -05:00
access.c
ats.c
bus.c
ecam.c
host-bridge.c
iov.c PCI/IOV: Fix memory leak in pci_iov_add_virtfn() 2020-02-14 16:34:08 -05:00
irq.c
Kconfig
Makefile
mmap.c
msi.c
of.c
p2pdma.c
pci-acpi.c
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c PCI/PM: Clear PCIe PME Status even for legacy power management 2020-01-17 19:48:53 +01:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c
pci.c PCI: Fix pci_add_dma_alias() bitmask size 2020-02-24 08:36:24 +01:00
pci.h PCI: Fix pci_add_dma_alias() bitmask size 2020-02-24 08:36:24 +01:00
probe.c PCI: Fix missing bridge dma_ranges resource list cleanup 2020-01-17 19:48:53 +01:00
proc.c
quirks.c PCI: Add DMA alias quirk for Intel VCA NTB 2020-02-01 09:34:47 +00:00
remove.c
rom.c
search.c PCI: Fix pci_add_dma_alias() bitmask size 2020-02-24 08:36:24 +01:00
setup-bus.c PCI: Don't disable bridge BARs when assigning bus resources 2020-02-14 16:34:09 -05:00
setup-irq.c
setup-res.c
slot.c
syscall.c
vc.c
vpd.c
xen-pcifront.c