* [PATCH] list_add corruption in slab.c @ 2008-03-25 16:57 Daniel Yeisley 2008-03-25 18:45 ` Pekka Enberg 0 siblings, 1 reply; 8+ messages in thread From: Daniel Yeisley @ 2008-03-25 16:57 UTC (permalink / raw) To: linux-kernel; +Cc: akpm I've been seeing list_add corruption in slab.c on the ES7000 since the 2.6.24.1 kernel. There are several places where the initkmem_list3 array is access by [somevalue + node]. This also needs to be done in kmem_cache_init(). Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com> --- diff -Naur linux-2.6.25-rc5/mm/slab.c linux-2.6.25-rc5-new/mm/slab.c --- linux-2.6.25-rc5/mm/slab.c 2008-03-10 01:22:27.000000000 -0400 +++ linux-2.6.25-rc5-new/mm/slab.c 2008-03-20 13:59:24.000000000 -0400 @@ -1481,7 +1481,7 @@ list_add(&cache_cache.next, &cache_chain); cache_cache.colour_off = cache_line_size(); cache_cache.array[smp_processor_id()] = &initarray_cache.cache; - cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE]; + cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE + node]; /* * struct kmem_cache size depends on nr_node_ids, which ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] list_add corruption in slab.c 2008-03-25 16:57 [PATCH] list_add corruption in slab.c Daniel Yeisley @ 2008-03-25 18:45 ` Pekka Enberg 2008-03-25 20:44 ` Daniel Yeisley 0 siblings, 1 reply; 8+ messages in thread From: Pekka Enberg @ 2008-03-25 18:45 UTC (permalink / raw) To: Daniel Yeisley; +Cc: linux-kernel, akpm, Christoph Lameter Hi Daniel, On Tue, Mar 25, 2008 at 6:57 PM, Daniel Yeisley <dan.yeisley@unisys.com> wrote: > I've been seeing list_add corruption in slab.c on the ES7000 since the > 2.6.24.1 kernel. There are several places where the initkmem_list3 > array is access by [somevalue + node]. This also needs to be done in > kmem_cache_init(). > > Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com> > > --- > diff -Naur linux-2.6.25-rc5/mm/slab.c linux-2.6.25-rc5-new/mm/slab.c > --- linux-2.6.25-rc5/mm/slab.c 2008-03-10 01:22:27.000000000 -0400 > +++ linux-2.6.25-rc5-new/mm/slab.c 2008-03-20 13:59:24.000000000 -0400 > @@ -1481,7 +1481,7 @@ > list_add(&cache_cache.next, &cache_chain); > cache_cache.colour_off = cache_line_size(); > cache_cache.array[smp_processor_id()] = &initarray_cache.cache; > - cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE]; > + cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE + node]; Good catch! You'd need to fix up the use of initkmem_list3 farther down in kmem_init_cache(): > /* 5) Replace the bootstrap kmem_list3's */ > { > int nid; > > for_each_online_node(nid) { > init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], nid); Care to send a tested patch that fixes that as well? Pekka ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] list_add corruption in slab.c 2008-03-25 18:45 ` Pekka Enberg @ 2008-03-25 20:44 ` Daniel Yeisley 2008-03-25 21:13 ` Pekka Enberg 0 siblings, 1 reply; 8+ messages in thread From: Daniel Yeisley @ 2008-03-25 20:44 UTC (permalink / raw) To: Pekka Enberg; +Cc: linux-kernel, akpm, Christoph Lameter On Tue, 2008-03-25 at 20:45 +0200, Pekka Enberg wrote: > Hi Daniel, > > On Tue, Mar 25, 2008 at 6:57 PM, Daniel Yeisley <dan.yeisley@unisys.com> wrote: > > I've been seeing list_add corruption in slab.c on the ES7000 since the > > 2.6.24.1 kernel. There are several places where the initkmem_list3 > > array is access by [somevalue + node]. This also needs to be done in > > kmem_cache_init(). > > > > Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com> > > > > --- > > diff -Naur linux-2.6.25-rc5/mm/slab.c linux-2.6.25-rc5-new/mm/slab.c > > --- linux-2.6.25-rc5/mm/slab.c 2008-03-10 01:22:27.000000000 -0400 > > +++ linux-2.6.25-rc5-new/mm/slab.c 2008-03-20 13:59:24.000000000 -0400 > > @@ -1481,7 +1481,7 @@ > > list_add(&cache_cache.next, &cache_chain); > > cache_cache.colour_off = cache_line_size(); > > cache_cache.array[smp_processor_id()] = &initarray_cache.cache; > > - cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE]; > > + cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE + node]; > > Good catch! You'd need to fix up the use of initkmem_list3 farther > down in kmem_init_cache(): > > > /* 5) Replace the bootstrap kmem_list3's */ > > { > > int nid; > > > > for_each_online_node(nid) { > > init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], nid); > > Care to send a tested patch that fixes that as well? > > Pekka I actually saw that initkmem_list reference, but didn't change it since my original patch fixed my list corruption. Anyway, I made the changed and tested it. The system booted fine. Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com> --- diff -Nuar linux-2.6.25-rc6/mm/slab.c linux-2.6.25-rc6-new/mm/slab.c --- linux-2.6.25-rc6/mm/slab.c 2008-03-25 15:39:07.000000000 -0400 +++ linux-2.6.25-rc6-new/mm/slab.c 2008-03-25 15:13:01.000000000 -0400 @@ -1481,7 +1481,7 @@ list_add(&cache_cache.next, &cache_chain); cache_cache.colour_off = cache_line_size(); cache_cache.array[smp_processor_id()] = &initarray_cache.cache; - cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE]; + cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE + node]; /* * struct kmem_cache size depends on nr_node_ids, which @@ -1602,7 +1602,7 @@ int nid; for_each_online_node(nid) { - init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], nid); + init_list(&cache_cache, &initkmem_list3[CACHE_CACHE + nid], nid); init_list(malloc_sizes[INDEX_AC].cs_cachep, &initkmem_list3[SIZE_AC + nid], nid); ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] list_add corruption in slab.c 2008-03-25 20:44 ` Daniel Yeisley @ 2008-03-25 21:13 ` Pekka Enberg 2008-03-25 21:27 ` Oliver Pinter 2008-03-26 14:16 ` Mel Gorman 0 siblings, 2 replies; 8+ messages in thread From: Pekka Enberg @ 2008-03-25 21:13 UTC (permalink / raw) To: Daniel Yeisley; +Cc: linux-kernel, akpm, Christoph Lameter, mel Hi Daniel, Daniel Yeisley wrote: > I actually saw that initkmem_list reference, but didn't change it since > my original patch fixed my list corruption. Anyway, I made the changed > and tested it. The system booted fine. Yeah, but the second change is needed; otherwise we forget to fix up some of the bootstrap caches. > Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Mel, as this change is related to the memoryless node fix that went in 2.6.24, any chance you'd give this patch a spin on your machines so we can get the fix in 2.6.25 and 2.6.24-stable? Pekka ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] list_add corruption in slab.c 2008-03-25 21:13 ` Pekka Enberg @ 2008-03-25 21:27 ` Oliver Pinter 2008-03-25 21:38 ` Pekka Enberg 2008-03-26 14:16 ` Mel Gorman 1 sibling, 1 reply; 8+ messages in thread From: Oliver Pinter @ 2008-03-25 21:27 UTC (permalink / raw) To: Pekka Enberg; +Cc: Daniel Yeisley, linux-kernel, akpm, Christoph Lameter, mel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1554 bytes --] Hi Pekka this patch for 2.6.22?(http://repo.or.cz/w/linux-2.6.22.y-op.git) --8<-- /* 1) create the cache_cache */ INIT_LIST_HEAD(&cache_chain); list_add(&cache_cache.next, &cache_chain); cache_cache.colour_off = cache_line_size(); cache_cache.array[smp_processor_id()] = &initarray_cache.cache; cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE];-->8--from 2.6.22's slab.c On 3/25/08, Pekka Enberg <penberg@cs.helsinki.fi> wrote:> Hi Daniel,>> Daniel Yeisley wrote:> > I actually saw that initkmem_list reference, but didn't change it since> > my original patch fixed my list corruption. Anyway, I made the changed> > and tested it. The system booted fine.>> Yeah, but the second change is needed; otherwise we forget to fix up> some of the bootstrap caches.>> > Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com>>> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>>> Mel, as this change is related to the memoryless node fix that went in> 2.6.24, any chance you'd give this patch a spin on your machines so we> can get the fix in 2.6.25 and 2.6.24-stable?>> Pekka> --> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in> the body of a message to majordomo@vger.kernel.org> More majordomo info at http://vger.kernel.org/majordomo-info.html> Please read the FAQ at http://www.tux.org/lkml/> -- Thanks,Oliverÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] list_add corruption in slab.c 2008-03-25 21:27 ` Oliver Pinter @ 2008-03-25 21:38 ` Pekka Enberg 2008-03-25 21:42 ` Oliver Pinter 0 siblings, 1 reply; 8+ messages in thread From: Pekka Enberg @ 2008-03-25 21:38 UTC (permalink / raw) To: Oliver Pinter; +Cc: Daniel Yeisley, linux-kernel, akpm, Christoph Lameter, mel Hi Oliver, On Tue, Mar 25, 2008 at 11:27 PM, Oliver Pinter <oliver.pntr@gmail.com> wrote: > this patch for 2.6.22? No. It fixes the following commit which is not in nor is it required for 2.6.22: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=556a169dab38b5100df6f4a45b655dddd3db94c1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] list_add corruption in slab.c 2008-03-25 21:38 ` Pekka Enberg @ 2008-03-25 21:42 ` Oliver Pinter 0 siblings, 0 replies; 8+ messages in thread From: Oliver Pinter @ 2008-03-25 21:42 UTC (permalink / raw) To: Pekka Enberg; +Cc: Daniel Yeisley, linux-kernel, akpm, Christoph Lameter, mel thanks for the fast answer On 3/25/08, Pekka Enberg <penberg@cs.helsinki.fi> wrote: > Hi Oliver, > > On Tue, Mar 25, 2008 at 11:27 PM, Oliver Pinter <oliver.pntr@gmail.com> > wrote: > > this patch for 2.6.22? > > No. It fixes the following commit which is not in nor is it required for > 2.6.22: > > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=556a169dab38b5100df6f4a45b655dddd3db94c1 > -- Thanks, Oliver ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] list_add corruption in slab.c 2008-03-25 21:13 ` Pekka Enberg 2008-03-25 21:27 ` Oliver Pinter @ 2008-03-26 14:16 ` Mel Gorman 1 sibling, 0 replies; 8+ messages in thread From: Mel Gorman @ 2008-03-26 14:16 UTC (permalink / raw) To: Pekka Enberg; +Cc: Daniel Yeisley, linux-kernel, akpm, Christoph Lameter On (25/03/08 23:13), Pekka Enberg didst pronounce: > Hi Daniel, > > Daniel Yeisley wrote: > >I actually saw that initkmem_list reference, but didn't change it since > >my original patch fixed my list corruption. Anyway, I made the changed > >and tested it. The system booted fine. > > Yeah, but the second change is needed; otherwise we forget to fix up > some of the bootstrap caches. > > > ???Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com> > > Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> > > Mel, as this change is related to the memoryless node fix that went in > 2.6.24, any chance you'd give this patch a spin on your machines so we > can get the fix in 2.6.25 and 2.6.24-stable? > Of course. Tested against 2.6.25-rc5 on normal and memoryless machines running just kernbench. So far, I have seen no problems. -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-03-26 14:16 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-03-25 16:57 [PATCH] list_add corruption in slab.c Daniel Yeisley 2008-03-25 18:45 ` Pekka Enberg 2008-03-25 20:44 ` Daniel Yeisley 2008-03-25 21:13 ` Pekka Enberg 2008-03-25 21:27 ` Oliver Pinter 2008-03-25 21:38 ` Pekka Enberg 2008-03-25 21:42 ` Oliver Pinter 2008-03-26 14:16 ` Mel Gorman
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.