Re: [Qemu-devel] [PATCH 07/20] iscsi: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:05PM +0200, Kevin Wolf wrote: > @@ -550,7 +553,11 @@ static BlockDriverAIOCB > *iscsi_aio_ioctl(BlockDriverState *bs, > #else > struct iovec *iov = (struct iovec *)acb->ioh->dxferp; > > -acb->buf = g_malloc(acb->ioh->dxfer_len); > +

Re: [Qemu-devel] [PATCH 07/20] iscsi: Handle failure for potentially large allocations

2014-05-21 Thread Paolo Bonzini
Il 21/05/2014 18:28, Kevin Wolf ha scritto: 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 iscsi block driver. Signed-

[Qemu-devel] [PATCH 07/20] iscsi: Handle failure for potentially large allocations

2014-05-21 Thread Kevin Wolf
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 iscsi block driver. Signed-off-by: Kevin Wolf --- block/iscsi.c | 16 ++