From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu0ll-0003ir-Jw for qemu-devel@nongnu.org; Wed, 04 Nov 2015 11:18:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zu0lh-0002Lm-P9 for qemu-devel@nongnu.org; Wed, 04 Nov 2015 11:18:41 -0500 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:36457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu0lh-0002Lg-In for qemu-devel@nongnu.org; Wed, 04 Nov 2015 11:18:37 -0500 Received: by wicfx6 with SMTP id fx6so92674363wic.1 for ; Wed, 04 Nov 2015 08:18:37 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 4 Nov 2015 17:18:19 +0100 Message-Id: <1446653912-116150-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1446653912-116150-1-git-send-email-pbonzini@redhat.com> References: <1446653912-116150-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 01/14] file_ram_alloc: propagate error to caller instead of terminating QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov From: Igor Mammedov 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 Message-Id: <1445274671-17704-1-git-send-email-imammedo@redhat.com> Signed-off-by: Paolo Bonzini --- exec.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/exec.c b/exec.c index 8af2570..7431f2f 100644 --- a/exec.c +++ b/exec.c @@ -1282,10 +1282,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 -- 1.8.3.1