qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] file_ram_alloc: propagate error to caller inste


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] file_ram_alloc: propagate error to caller instead of terminating QEMU
Date: Tue, 20 Oct 2015 14:00:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 19/10/2015 19:11, Igor Mammedov wrote:
> QEMU shouldn't exits from file_ram_alloc() if -mem-prealloc option is 
> specified
> and "object_add memory-backend-file,..." fails allocation during memory 
> hotplug.
> 
> Propagate error to a caller and let it decide what to do with allocation 
> failure.
> That leaves QEMU alive if it can't create backend during hotplug time and
> kills QEMU at startup time if backends or initial memory were misconfigured/
> too large.
> 
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
>  exec.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/exec.c b/exec.c
> index 7d90a52..0aadd41 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1292,10 +1292,6 @@ static void *file_ram_alloc(RAMBlock *block,
>      return area;
>  
>  error:
> -    if (mem_prealloc) {
> -        error_report("%s", error_get_pretty(*errp));
> -        exit(1);
> -    }
>      return NULL;
>  }
>  #endif
> 

Queued, thanks.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]