linux/drivers/pci/msi
Josef Johansson 2b96f92ca4 PCI/MSI: Correct 'can_mask' test in msi_add_msi_desc()
71020a3c0d ("PCI/MSI: Use msi_add_msi_desc()") inadvertently reversed
the sense of "msi_attrib.can_mask" in one use:

  - if (entry->pci.msi_attrib.can_mask) {
  -         addr = pci_msix_desc_addr(entry);
  -         entry->pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
  + if (!desc.pci.msi_attrib.can_mask) {
  +         addr = pci_msix_desc_addr(&desc);
  +         desc.pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL);

Restore the original test.

[bhelgaas: commit log]
Fixes: 71020a3c0d ("PCI/MSI: Use msi_add_msi_desc()")
Link: https://lore.kernel.org/r/d818f9c9-a432-213e-4152-eaff3b7da52e@oderland.se
Signed-off-by: Josef Johansson <josef@oderland.se>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
2022-08-26 10:47:54 -05:00
..
irqdomain.c PCI/MSI: Prevent UAF in error path 2022-01-21 02:14:46 +01:00
legacy.c PCI/MSI: Prevent UAF in error path 2022-01-21 02:14:46 +01:00
Makefile
msi.c PCI/MSI: Correct 'can_mask' test in msi_add_msi_desc() 2022-08-26 10:47:54 -05:00
msi.h
pcidev_msi.c