From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, peter.crosthwaite@xilinx.com, hutao@cn.fujitsu.com
Subject: [Qemu-devel] [PATCH 3/4] loader: Fix memory_region_init_resizeable_ram() error handling
Date: Fri, 11 Sep 2015 16:51:44 +0200 [thread overview]
Message-ID: <1441983105-26376-4-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1441983105-26376-1-git-send-email-armbru@redhat.com>
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 <armbru@redhat.com>
---
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 216eeeb..3b29881 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -741,7 +741,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
next prev parent reply other threads:[~2015-09-11 14:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 14:51 [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again) Markus Armbruster
2015-09-11 14:51 ` [Qemu-devel] [PATCH 1/4] error: New error_fatal Markus Armbruster
2015-09-11 15:13 ` Eric Blake
2015-09-11 14:51 ` [Qemu-devel] [PATCH 2/4] Fix bad error handling after memory_region_init_ram() Markus Armbruster
2015-09-14 5:13 ` Peter Crosthwaite
2015-09-14 7:57 ` Markus Armbruster
2015-09-11 14:51 ` Markus Armbruster [this message]
2015-09-11 14:51 ` [Qemu-devel] [PATCH 4/4] memory: Fix bad error handling in memory_region_init_ram_ptr() Markus Armbruster
2015-09-11 15:10 ` [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again) Markus Armbruster
2015-09-14 5:14 ` Peter Crosthwaite
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=1441983105-26376-4-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=hutao@cn.fujitsu.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.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).