From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcvd0-0000lo-8P for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:23:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcvcy-00021G-4U for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:23:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcvcx-00020b-Mi for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:23:00 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 034ABAC856 for ; Fri, 18 Sep 2015 13:22:58 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8IDMvO1022690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 18 Sep 2015 09:22:58 -0400 From: Markus Armbruster Date: Fri, 18 Sep 2015 15:22:54 +0200 Message-Id: <1442582574-14275-9-git-send-email-armbru@redhat.com> In-Reply-To: <1442582574-14275-1-git-send-email-armbru@redhat.com> References: <1442582574-14275-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL 8/8] memory: Fix bad error handling in memory_region_init_ram_ptr() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Commit ef701d7 screwed up handling of out-of-memory conditions. Before the commit, we report the error and exit(1), in one place. The commit lifts the error handling up the call chain some, to three places. Fine. Except it uses &error_abort in these places, changing the behavior from exit(1) to abort(), and thus undoing the work of commit 3922825 "exec: Don't abort when we can't allocate guest memory". The previous two commits fixed one of the three places, another one was fixed in commit 33e0eb5. This commit fixes the third one. Signed-off-by: Markus Armbruster Message-Id: <1441983105-26376-5-git-send-email-armbru@redhat.com> Reviewed-by: Peter Crosthwaite --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index 0d8b2d9..ef87363 100644 --- a/memory.c +++ b/memory.c @@ -1251,7 +1251,7 @@ void memory_region_init_ram_ptr(MemoryRegion *mr, /* qemu_ram_alloc_from_ptr cannot fail with ptr != NULL. */ assert(ptr != NULL); - mr->ram_addr = qemu_ram_alloc_from_ptr(size, ptr, mr, &error_abort); + mr->ram_addr = qemu_ram_alloc_from_ptr(size, ptr, mr, &error_fatal); } void memory_region_set_skip_dump(MemoryRegion *mr) -- 2.4.3