mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [rmap] fix node offsets into zone_table[]
@ 2002-02-15  1:59 William Lee Irwin III
  0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-02-15  1:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: sortiz, riel

Against rmap12f
free_area_init_core() initializes zone_table[] with no node offset,
and sets the zone of a page using pgdat->nid (uninitialized on entry
to free_area_init_core()) as a node number.

Bug and fix reported by Samuel Ortiz.

Cheers,
Bill


# This is a BitKeeper generated patch for the following project:
# Project Name: Long-term Linux VM development
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.198   ->        
#	     mm/page_alloc.c	1.58    -> 1.59   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/14	wli@holomorphy.com	1.199
# Fix zone_table[] initialization bugs where zone_table uses either no node offset
# for the index or an uninitialized field of pgdat as a node number.
# --------------------------------------------
#
diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c	Thu Feb 14 17:51:19 2002
+++ b/mm/page_alloc.c	Thu Feb 14 17:51:19 2002
@@ -897,7 +897,7 @@
 		unsigned long mask, extrafree = 0;
 		unsigned long size, realsize;
 
-		zone_table[j] = zone;
+		zone_table[nid * MAX_NR_ZONES + j] = zone;
 		realsize = size = zones_size[j];
 		if (zholes_size)
 			realsize -= zholes_size[j];
@@ -982,7 +982,7 @@
 		 */
 		for (i = 0; i < size; i++) {
 			struct page *page = mem_map + offset + i;
-			set_page_zone(page, pgdat->node_id * MAX_NR_ZONES + j);
+			set_page_zone(page, nid * MAX_NR_ZONES + j);
 			init_page_count(page);
 			__SetPageReserved(page);
 			memlist_init(&page->list);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-15  2:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-15  1:59 [PATCH] [rmap] fix node offsets into zone_table[] William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®