]> git.proxmox.com Git - mirror_qemu.git/commit - block/block-backend.c
nbd-server: do not exit on failed memory allocation
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Jan 2016 13:34:13 +0000 (14:34 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Jan 2016 17:58:02 +0000 (18:58 +0100)
commitf1c17521e79df863a5771d96974fab0d07f02be0
treebae9be2eab046875ad495fb59a345d8ab30d0703
parenteb38c3b67018ff8069e4f674a28661931a8a3e4f
nbd-server: do not exit on failed memory allocation

The amount of memory allocated in nbd_co_receive_request is driven by the
NBD client (possibly a virtual machine).  Parallel I/O can cause the
server to allocate a large amount of memory; check for failures and
return ENOMEM in that case.

Cc: qemu-block@nongnu.org
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/block-backend.c
include/sysemu/block-backend.h
nbd/server.c