qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <56262CEC.2030107@redhat.com> (raw)
In-Reply-To: <1445274671-17704-1-git-send-email-imammedo@redhat.com>



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 <imammedo@redhat.com>
> ---
>  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	other threads:[~2015-10-20 12:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19 17:11 [Qemu-devel] [PATCH] file_ram_alloc: propagate error to caller instead of terminating QEMU Igor Mammedov
2015-10-20 12:00 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56262CEC.2030107@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).