From: Xiao Guangrong <ericxiao.gr@gmail.com>
To: "keir.fraser" <keir.fraser@eu.citrix.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] e820: fix e820_change_range_type()
Date: Tue, 10 Nov 2009 03:19:44 +0800 [thread overview]
Message-ID: <4AF86B50.7050402@gmail.com> (raw)
In below case, e820_change_range_type() will return succee:
[s, e] is in the middle of [rs, re] and e820->nr_map+1 >= ARRAY_SIZE(e820->map)
actually, it's failed, so this patch fix it
Signed-off-by: Xiao Guangrong <ericxiao.gr@gmail.com>
diff -r f23b859e237a -r 93bc06dd1161 xen/arch/x86/e820.c
--- a/xen/arch/x86/e820.c Tue Nov 10 02:34:16 2009 +0800
+++ b/xen/arch/x86/e820.c Tue Nov 10 02:41:59 2009 +0800
@@ -574,7 +574,7 @@
e820->map[i+1].type = new_type;
}
}
- else if ( e820->nr_map+1 < ARRAY_SIZE(e820->map) )
+ else
{
if ( (e820->nr_map + 2) > ARRAY_SIZE(e820->map) )
goto overflow;
reply other threads:[~2009-11-09 19:19 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=4AF86B50.7050402@gmail.com \
--to=ericxiao.gr@gmail.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
--cc=xiaoguangrong@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.