kexec: propagate ENOMEM result in error handling
PATCH 1/1 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 <[email protected]>
--- xen/common/kimage.c | 1 + 1 file changed, 1 insertion(+)
xen/common/kimage.c +1 -0
@@ -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;
Signature · 1 line
1.9.0
Quoted 3 lines · Matthew Daley
...otherwise if
kimage_alloc_control_pagefails (presumably due to out-of-memory; see the invocation just before this one), the caller ofdo_kimage_allocwill think the call was successful.
Reviewed-by David Vrabel <[email protected]>
Thanks.
David