From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: horms@verge.net.au
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: [PATCH 2/2] kexec: add additional check when getting memory info
Date: Fri, 11 Jan 2013 16:58:45 +0800 [thread overview]
Message-ID: <50EFD445.2090002@cn.fujitsu.com> (raw)
In-Reply-To: <50EFD3F0.9030900@cn.fujitsu.com>
This check makes sure that we indeed get the memory information.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
kexec/kexec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 89ec182..16c6308 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -675,7 +675,7 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
#endif
if (get_memory_ranges(&info.memory_range, &info.memory_ranges,
- info.kexec_flags) < 0) {
+ info.kexec_flags) < 0 || info.memory_ranges == 0) {
fprintf(stderr, "Could not get memory layout\n");
return -1;
}
--
1.7.1
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-01-11 9:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 8:57 [PATCH 1/2] kexec,x86: remove duplicate get_memory_ranges Zhang Yanfei
2013-01-11 8:58 ` Zhang Yanfei [this message]
2013-01-30 4:16 ` [PATCH 2/2] kexec: add additional check when getting memory info Simon Horman
2013-01-15 4:56 ` [PATCH 1/2] kexec,x86: remove duplicate get_memory_ranges Zhang Yanfei
2013-01-30 4:16 ` Simon Horman
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=50EFD445.2090002@cn.fujitsu.com \
--to=zhangyanfei@cn.fujitsu.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/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.