[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4B8C7C94.7070000@kernel.org>
Date: Mon, 01 Mar 2010 18:48:52 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>
CC: Peter Zijlstra <peterz@...radead.org>, Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
Pekka Enberg <penberg@...helsinki.fi>
Subject: [PATCH] early_res: need to save name aside with free_early_partial
noticed some early_res got blank name.
it turns out reserve_early_without_check could update allocate new early_res
and copy old early_res already. so can not take early_res as parameter.
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
---
kernel/early_res.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
Index: linux-2.6/kernel/early_res.c
===================================================================
--- linux-2.6.orig/kernel/early_res.c
+++ linux-2.6/kernel/early_res.c
@@ -79,9 +79,16 @@ static void __init drop_range_partial(in
/* make head segment */
early_res[i].end = common_start;
if (old_end > common_end) {
+ char name[15];
+
+ /*
+ * Save name aside, in reserve_early_ have allocated
+ * and new early_res array because auto double
+ */
+ strncpy(name, early_res[i].name,
+ sizeof(early_res[i].name) - 1);
/* add another for left over on tail */
- reserve_early_without_check(common_end, old_end,
- early_res[i].name);
+ reserve_early_without_check(common_end, old_end, name);
}
return;
} else {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists