[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100604211025.GA17881@os.inf.tu-dresden.de>
Date: Fri, 4 Jun 2010 23:10:25 +0200
From: Adam Lackorzynski <adam@...inf.tu-dresden.de>
To: linux-kernel@...r.kernel.org, Yinghai Lu <yinghai@...nel.org>,
Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH] early_res: fix check in free_early_partial
free_early_partial must check the returned region of find_overlapped_early()
whether it is a region at all. Otherwise the function will indefinitely
loop.
Signed-off-by: Adam Lackorzynski <adam@...inf.tu-dresden.de>
---
kernel/early_res.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/early_res.c b/kernel/early_res.c
index 31aa933..9afcb4c 100644
--- a/kernel/early_res.c
+++ b/kernel/early_res.c
@@ -341,10 +341,11 @@ void __init free_early_partial(u64 start, u64 end)
try_next:
i = find_overlapped_early(start, end);
- if (i >= max_early_res)
+ r = &early_res[i];
+
+ if (i >= max_early_res || !r->end)
return;
- r = &early_res[i];
/* hole ? */
if (r->end >= end && r->start <= start) {
drop_range_partial(i, start, end);
--
1.7.1
--
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