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

[Xen-changelog] [xen master] kexec: propagate ENOMEM result in error handling



commit 66c6349265d6536d0b77cd958ee3e5074e86233a
Author:     Matthew Daley <mattd@xxxxxxxxxxx>
AuthorDate: Tue Apr 1 16:48:02 2014 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Apr 1 16:48:02 2014 +0200

    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>
    Reviewed-by: David Vrabel <david.vrabel@xxxxxxxxxx>
---
 xen/common/kimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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