From: Christoph Lameter Date: Thu, 23 Jun 2005 03:26:07 +0000 (-0700) Subject: [PATCH] boot_pageset must not be freed. X-Git-Tag: v2.6.13-rc4~130^2~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7c84c6ada2be942eca6722edb2cfaad412cd5de;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [PATCH] boot_pageset must not be freed. The boot_pageset needs to be preserved for hotplugging and for off line processors and nodes. Otherwise pointers will point into memory that has now a different use. /proc/zoneinfo is currently showing strange results if processors / nodes are not present. Signed-off-by: Christoph Lameter Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2069207..559336d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1742,10 +1742,17 @@ inline void setup_pageset(struct per_cpu_pageset *p, unsigned long batch) * with interrupts disabled. * * Some NUMA counter updates may also be caught by the boot pagesets. - * These will be discarded when bootup is complete. + * + * The boot_pagesets must be kept even after bootup is complete for + * unused processors and/or zones. They do play a role for bootstrapping + * hotplugged processors. + * + * zoneinfo_show() and maybe other functions do + * not check if the processor is online before following the pageset pointer. + * Other parts of the kernel may not check if the zone is available. */ static struct per_cpu_pageset - boot_pageset[NR_CPUS] __initdata; + boot_pageset[NR_CPUS]; /* * Dynamically allocate memory for the