aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorJames Sewart <[email protected]>2019-12-10 15:51:33 -0600
committerBjorn Helgaas <[email protected]>2019-12-18 12:21:16 -0600
commitf8bf2aeb651b3460a4b36fd7ba1ba1d31777d35c (patch)
tree202de2282e09e50ca722a0e65f336fee7c36a901 /scripts/gcc-plugins/randomize_layout_plugin.c
parent8c386cc817878588195dde38e919aa6ba9409d58 (diff)
PCI: Fix pci_add_dma_alias() bitmask size
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 338c3149a221 ("PCI: Add support for multiple DMA aliases") and c6635792737b ("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]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions