cache_k8_northbridges() overflows beyond allocation
authorBadari Pulavarty <pbadari@gmail.com>
Fri, 13 Apr 2007 15:13:42 +0000 (08:13 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Apr 2007 01:09:18 +0000 (18:09 -0700)
cache_k8_northbridges() is storing config values to incorrect locations
(in flush_words) and also its overflowing beyond the allocation, causing
slab verification failures.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/k8.c

index 6416682d33d08b878ed771ea32d0497aedbdb960..bc11b32e8b4d41fb000692825048d1dcd3a0339c 100644 (file)
@@ -61,8 +61,8 @@ int cache_k8_northbridges(void)
        dev = NULL;
        i = 0;
        while ((dev = next_k8_northbridge(dev)) != NULL) {
-               k8_northbridges[i++] = dev;
-               pci_read_config_dword(dev, 0x9c, &flush_words[i]);
+               k8_northbridges[i] = dev;
+               pci_read_config_dword(dev, 0x9c, &flush_words[i++]);
        }
        k8_northbridges[i] = NULL;
        return 0;