diff options
author | Daniel Yeisley <dan.yeisley@unisys.com> | 2008-03-25 17:59:08 -0400 |
---|---|---|
committer | Christoph Lameter <clameter@sgi.com> | 2008-03-26 13:44:17 -0400 |
commit | ec1f5eeeb5a79a0d48036de649a3498da42db565 (patch) | |
tree | 29b34d9aae8b61633e8ad549864d97cc474ec6b2 | |
parent | 53625b4204753b904addd40ca96d9ba802e6977d (diff) |
slab: fix cache_cache bootstrap in kmem_cache_init()
Commit 556a169dab38b5100df6f4a45b655dddd3db94c1 ("slab: fix bootstrap on
memoryless node") introduced bootstrap-time cache_cache list3s for all nodes
but forgot that initkmem_list3 needs to be accessed by [somevalue + node]. This
patch fixes list_add() corruption in mm/slab.c seen on the ES7000.
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Olaf Hering <olaf@aepfle.de>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
-rw-r--r-- | mm/slab.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1481,7 +1481,7 @@ void __init kmem_cache_init(void) | |||
1481 | list_add(&cache_cache.next, &cache_chain); | 1481 | list_add(&cache_cache.next, &cache_chain); |
1482 | cache_cache.colour_off = cache_line_size(); | 1482 | cache_cache.colour_off = cache_line_size(); |
1483 | cache_cache.array[smp_processor_id()] = &initarray_cache.cache; | 1483 | cache_cache.array[smp_processor_id()] = &initarray_cache.cache; |
1484 | cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE]; | 1484 | cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE + node]; |
1485 | 1485 | ||
1486 | /* | 1486 | /* |
1487 | * struct kmem_cache size depends on nr_node_ids, which | 1487 | * struct kmem_cache size depends on nr_node_ids, which |
@@ -1602,7 +1602,7 @@ void __init kmem_cache_init(void) | |||
1602 | int nid; | 1602 | int nid; |
1603 | 1603 | ||
1604 | for_each_online_node(nid) { | 1604 | for_each_online_node(nid) { |
1605 | init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], nid); | 1605 | init_list(&cache_cache, &initkmem_list3[CACHE_CACHE + nid], nid); |
1606 | 1606 | ||
1607 | init_list(malloc_sizes[INDEX_AC].cs_cachep, | 1607 | init_list(malloc_sizes[INDEX_AC].cs_cachep, |
1608 | &initkmem_list3[SIZE_AC + nid], nid); | 1608 | &initkmem_list3[SIZE_AC + nid], nid); |