From: Matthew Daley <mattd@bugfuzz.com>
To: xen-devel@lists.xenproject.org
Cc: Matthew Daley <mattd@bugfuzz.com>, david.vrabel@citrix.com
Subject: [PATCH] kexec: propagate ENOMEM result in error handling
Date: Sat, 29 Mar 2014 18:06:09 +1300 [thread overview]
Message-ID: <1396069569-5659-1-git-send-email-mattd@bugfuzz.com> (raw)
...otherwise if kimage_alloc_control_page fails (presumably due to
out-of-memory; see the invocation just before this one), the caller of
do_kimage_alloc will think the call was successful.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
---
xen/common/kimage.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/common/kimage.c b/xen/common/kimage.c
index 91943f1..9b79a5e 100644
--- a/xen/common/kimage.c
+++ b/xen/common/kimage.c
@@ -182,6 +182,7 @@ static int do_kimage_alloc(struct kexec_image **rimage, paddr_t entry,
goto out;
/* Add an empty indirection page. */
+ result = -ENOMEM;
image->entry_page = kimage_alloc_control_page(image, 0);
if ( !image->entry_page )
goto out;
--
1.9.0
next reply other threads:[~2014-03-29 5:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 5:06 Matthew Daley [this message]
2014-04-01 10:13 ` [PATCH] kexec: propagate ENOMEM result in error handling David Vrabel
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=1396069569-5659-1-git-send-email-mattd@bugfuzz.com \
--to=mattd@bugfuzz.com \
--cc=david.vrabel@citrix.com \
--cc=xen-devel@lists.xenproject.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.