[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] kexec: propagate ENOMEM result in error handling



...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@xxxxxxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.