mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Cc: sortiz@dbear.engr.sgi.com, riel@surriel.com
Subject: [PATCH] [rmap] fix node offsets into zone_table[]
Date: Thu, 14 Feb 2002 17:59:54 -0800	[thread overview]
Message-ID: <20020215015954.GB26305@holomorphy.com> (raw)

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);

                 reply	other threads:[~2002-02-15  2:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020215015954.GB26305@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@surriel.com \
    --cc=sortiz@dbear.engr.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®