From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcvd0-0000lq-8R for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:23:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcvcy-00021f-LX for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:23:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcvcy-00021S-GZ for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:23:00 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id D87D0AC873 for ; Fri, 18 Sep 2015 13:22:59 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8IDMvmm027447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 18 Sep 2015 09:22:59 -0400 From: Markus Armbruster Date: Fri, 18 Sep 2015 15:22:53 +0200 Message-Id: <1442582574-14275-8-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 7/8] loader: Fix memory_region_init_resizeable_ram() error handling 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 commit fixed up uses of memory_region_init_ram(). One of them was replaced by memory_region_init_resizeable_ram() [sic!] in commit a166614, so Coccinelle missed it. Fix it up. Signed-off-by: Markus Armbruster Message-Id: <1441983105-26376-4-git-send-email-armbru@redhat.com> Reviewed-by: Peter Crosthwaite --- hw/core/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index a96a74e..eb67f05 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -740,7 +740,7 @@ static void *rom_set_mr(Rom *rom, Object *owner, const char *name) memory_region_init_resizeable_ram(rom->mr, owner, name, rom->datasize, rom->romsize, fw_cfg_resized, - &error_abort); + &error_fatal); memory_region_set_readonly(rom->mr, true); vmstate_register_ram_global(rom->mr); -- 2.4.3