vpc: Handle failure for potentially large allocations
commit5fb09cd5867aabf26d5b85b0913dccd496b71421
authorKevin Wolf <kwolf@redhat.com>
Wed, 21 May 2014 16:08:38 +0000 (21 18:08 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Aug 2014 13:07:16 +0000 (15 15:07 +0200)
tree3ca9d2389f1f24135a643f4fa9c01532cc67b9c3
parentd6e5993197990ff55c660714526681fa7028299e
vpc: 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 vpc block driver.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
block/vpc.c