]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix error bounds checking for NUMA-Q
authorMartin J. Bligh <mbligh@aracnet.com>
Fri, 28 Feb 2003 07:02:56 +0000 (23:02 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 28 Feb 2003 07:02:56 +0000 (23:02 -0800)
Patch from Dave Hansen.

Fix simple bounding error found by some Stanford-checker type thing
to use the proper MAX_MP_BUSSES define instead of a constant.

arch/i386/pci/numa.c

index 433e1bbc577ce1b5d3b1252bfb0e158b7ad28b9a..0a184f2c7b57d01ff475cd0aa434684368a480a3 100644 (file)
@@ -17,7 +17,7 @@ static int __pci_conf1_mq_read (int seg, int bus, int dev, int fn, int reg, int
 {
        unsigned long flags;
 
-       if (!value || (bus > 255) || (dev > 31) || (fn > 7) || (reg > 255))
+       if (!value || (bus > MAX_MP_BUSSES) || (dev > 31) || (fn > 7) || (reg > 255))
                return -EINVAL;
 
        spin_lock_irqsave(&pci_config_lock, flags);
@@ -45,7 +45,7 @@ static int __pci_conf1_mq_write (int seg, int bus, int dev, int fn, int reg, int
 {
        unsigned long flags;
 
-       if ((bus > 255) || (dev > 31) || (fn > 7) || (reg > 255)) 
+       if ((bus > MAX_MP_BUSSES) || (dev > 31) || (fn > 7) || (reg > 255)) 
                return -EINVAL;
 
        spin_lock_irqsave(&pci_config_lock, flags);