]> git.proxmox.com Git - mirror_qemu.git/commit - block/file-posix.c
raw-posix: Handle failure for potentially large allocations
authorKevin Wolf <kwolf@redhat.com>
Wed, 21 May 2014 16:02:42 +0000 (18:02 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Aug 2014 13:07:15 +0000 (15:07 +0200)
commit50d4a858e62b1d864227d13f07d2c79c118d046a
tree0e608d2c1c93d093dd0a6d5900bdb67ed8c46efe
parent4f4896db5fb2285df016ff927508560c89b845a4
raw-posix: Handle failure for potentially large allocations

Some code in the block layer makes potentially huge allocations. Failure
is not completely unexpected there, so avoid aborting qemu and handle
out-of-memory situations gracefully.

This patch addresses the allocations in the raw-posix block driver.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
block/raw-posix.c