[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 8/8] memory: Fix bad error handling in memory_region_
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 8/8] memory: Fix bad error handling in memory_region_init_ram_ptr() |
Date: |
Fri, 18 Sep 2015 15:22:54 +0200 |
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
---
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
- [Qemu-devel] [PULL 0/8] Error reporting patches, Markus Armbruster, 2015/09/18
- [Qemu-devel] [PULL 4/8] MAINTAINERS: Add "Error reporting" entry, Markus Armbruster, 2015/09/18
- [Qemu-devel] [PULL 3/8] error: Copy location information in error_copy(), Markus Armbruster, 2015/09/18
- [Qemu-devel] [PULL 1/8] error: only prepend timestamp on stderr, Markus Armbruster, 2015/09/18
- [Qemu-devel] [PULL 7/8] loader: Fix memory_region_init_resizeable_ram() error handling, Markus Armbruster, 2015/09/18
- [Qemu-devel] [PULL 2/8] hmp: Allow for error message hints on HMP, Markus Armbruster, 2015/09/18
- [Qemu-devel] [PULL 5/8] error: New error_fatal, Markus Armbruster, 2015/09/18
- [Qemu-devel] [PULL 8/8] memory: Fix bad error handling in memory_region_init_ram_ptr(),
Markus Armbruster <=
- [Qemu-devel] [PULL 6/8] Fix bad error handling after memory_region_init_ram(), Markus Armbruster, 2015/09/18
- Re: [Qemu-devel] [PULL 0/8] Error reporting patches, Peter Maydell, 2015/09/18