From: 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, stable@kernel.org, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:x86/mm] x86: fix 64k corruption-check
Date: Sun, 15 Mar 2009 06:12:26 GMT [thread overview]
Message-ID: <tip-6d7942dc2a70a7e74c352107b150265602671588@git.kernel.org> (raw)
In-Reply-To: <49BC2279.2030101@kernel.org>
Commit-ID: 6d7942dc2a70a7e74c352107b150265602671588
Gitweb: http://git.kernel.org/tip/6d7942dc2a70a7e74c352107b150265602671588
Author: Yinghai Lu <yinghai@kernel.org>
AuthorDate: Sat, 14 Mar 2009 14:32:41 -0700
Commit: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 15 Mar 2009 07:03:15 +0100
x86: fix 64k corruption-check
Impact: fix boot crash
Need to exit early if the addr is far above 64k.
The crash got exposed by:
78a8b35: x86: make e820_update_range() handle small range update
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: <stable@kernel.org>
LKML-Reference: <49BC2279.2030101@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/check.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index b617b11..fc999e6 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -86,12 +86,12 @@ void __init setup_bios_corruption_check(void)
if (!(addr + 1))
break;
+ if (addr >= corruption_check_size)
+ break;
+
if ((addr + size) > corruption_check_size)
size = corruption_check_size - addr;
- if (size == 0)
- break;
-
e820_update_range(addr, size, E820_RAM, E820_RESERVED);
scan_areas[num_scan_areas].addr = addr;
scan_areas[num_scan_areas].size = size;
next prev parent reply other threads:[~2009-03-15 6:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 12:57 [PATCH] x86: clean up output resulting from update_mptable option Jan Beulich
2009-03-13 2:34 ` [tip:x86/mm] " Jan Beulich
2009-03-13 4:35 ` [PATCH] x86: fix e820_update_range() Yinghai Lu
2009-03-13 4:39 ` [tip:x86/mm] " Yinghai Lu
2009-03-13 5:36 ` [PATCH] x86: make e820_update_range to handle small range update Yinghai Lu
2009-03-14 11:39 ` [tip:x86/mm] x86: make e820_update_range() " Yinghai Lu
2009-03-14 12:17 ` Ingo Molnar
2009-03-14 18:21 ` Yinghai Lu
2009-03-14 18:40 ` Ingo Molnar
2009-03-14 21:32 ` Yinghai Lu
2009-03-15 6:04 ` Ingo Molnar
2009-03-15 6:20 ` Yinghai Lu
2009-03-15 6:25 ` Ingo Molnar
2009-03-15 6:12 ` Yinghai Lu [this message]
2009-03-13 7:57 ` [PATCH] x86: fix e820_update_range() Jan Beulich
2009-03-13 11:13 ` Ingo Molnar
2009-03-13 18:22 ` Yinghai Lu
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-6d7942dc2a70a7e74c352107b150265602671588@git.kernel.org \
--to=yinghai@kernel.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=stable@kernel.org \
--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
Powered by JetHome