From: Matthew Daley Date: Tue, 1 Apr 2014 14:48:02 +0000 (+0200) Subject: kexec: propagate ENOMEM result in error handling X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5306^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=66c6349265d6536d0b77cd958ee3e5074e86233a;p=xen.git 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 Reviewed-by: David Vrabel --- diff --git a/xen/common/kimage.c b/xen/common/kimage.c index 91943f175a..9b79a5ed29 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;