From: tip-bot for Yinghai Lu <yinghai@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
yinghai@kernel.org, rusty@rustcorp.com.au,
akpm@linux-foundation.org, tglx@linutronix.de,
rientjes@google.com, mingo@elte.hu
Subject: [tip:x86/mm] x86, numa, bootmem: Only free bootmem on NUMA failure path
Date: Mon, 23 Nov 2009 11:52:29 GMT [thread overview]
Message-ID: <tip-021428ad1418cf3c386a1a0157140c3ea29b17ef@git.kernel.org> (raw)
In-Reply-To: <4B07A739.3030104@kernel.org>
Commit-ID: 021428ad1418cf3c386a1a0157140c3ea29b17ef
Gitweb: http://git.kernel.org/tip/021428ad1418cf3c386a1a0157140c3ea29b17ef
Author: Yinghai Lu <yinghai@kernel.org>
AuthorDate: Sat, 21 Nov 2009 00:23:37 -0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 23 Nov 2009 10:00:48 +0100
x86, numa, bootmem: Only free bootmem on NUMA failure path
In the NUMA bootmem setup failure path we freed nodedata_phys
incorrectly.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4B07A739.3030104@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/mm/numa_64.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 086f98a..3acd870 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -239,8 +239,14 @@ setup_node_bootmem(int nodeid, unsigned long start, unsigned long end)
bootmap = early_node_mem(nodeid, bootmap_start, end,
bootmap_pages<<PAGE_SHIFT, PAGE_SIZE);
if (bootmap == NULL) {
- if (nodedata_phys < start || nodedata_phys >= end)
- free_bootmem(nodedata_phys, pgdat_size);
+ if (nodedata_phys < start || nodedata_phys >= end) {
+ /*
+ * only need to free it if it is from other node
+ * bootmem
+ */
+ if (nid != nodeid)
+ free_bootmem(nodedata_phys, pgdat_size);
+ }
node_data[nodeid] = NULL;
return;
}
next prev parent reply other threads:[~2009-11-23 11:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-21 8:35 pci related patches 11-21-2009 Yinghai Lu
2009-11-21 8:39 ` x86 " Yinghai Lu
2009-11-23 11:51 ` [tip:x86/apic] x86: apic: Remove not needed #ifdef tip-bot for Yinghai Lu
2009-11-23 11:52 ` [tip:x86/apic] x86: Re-get cfg_new in case reuse/move irq_desc tip-bot for Yinghai Lu
2009-11-23 11:52 ` [tip:x86/apic] x86: apic: Print out SRAT table APIC id in hex tip-bot for Yinghai Lu
2009-11-23 11:52 ` tip-bot for Yinghai Lu [this message]
2009-11-23 11:52 ` [tip:x86/mm] x86, numa: Use near(er) online node instead of roundrobin for NUMA tip-bot for Yinghai Lu
2009-12-16 2:06 ` x86 related patches 12-15-2009 Yinghai Lu
2009-11-24 21:26 ` pci related patches 11-21-2009 Jesse Barnes
2009-11-25 2:16 ` Yinghai Lu
2009-11-25 4:45 ` Alex Chiang
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=tip-021428ad1418cf3c386a1a0157140c3ea29b17ef@git.kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/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®