ChangeSet 1.1998.11.12, 2005/02/07 16:20:50-08:00, [EMAIL PROTECTED] [PATCH] PCI: NUMA-Q PCI config access arg validation
Fix NUMA-Q PCI config access bus validation. "bus" indexes into BUS2QUAD, which is mp_bus_id_to_node[MAX_MP_BUSSES]. This depends on the "pci_raw_ops should use unsigned args" patch I posted earlier today (no functional dependency; it just happens to be very close textually). Signed-off-by: Bjorn Helgaas <[EMAIL PROTECTED]> Signed-off-by: Martin J. Bligh <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> arch/i386/pci/numa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -Nru a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c --- a/arch/i386/pci/numa.c 2005-03-04 12:42:52 -08:00 +++ b/arch/i386/pci/numa.c 2005-03-04 12:42:52 -08:00 @@ -18,7 +18,7 @@ { unsigned long flags; - if (!value || (bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) + if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) return -EINVAL; spin_lock_irqsave(&pci_config_lock, flags); @@ -46,7 +46,7 @@ { unsigned long flags; - if ((bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) + if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) return -EINVAL; spin_lock_irqsave(&pci_config_lock, flags); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/