qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] nbd: Async built-in server negotiation
@ 2015-12-30  5:49 Fam Zheng
  2015-12-30  5:49 ` [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new Fam Zheng
  2015-12-30  5:49 ` [Qemu-devel] [PATCH 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng
  0 siblings, 2 replies; 6+ messages in thread
From: Fam Zheng @ 2015-12-30  5:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Paolo Bonzini, qemu-block

During nbd_send_negotiate, if the client simply doesn't respond, the function
will not return, and the whole event loop is blocked.

Make the I/O effectively asynchronous by using coroutine read/write, so that a
malicious or disappeared client cannot make a hang.

Fam


Fam Zheng (2):
  nbd: Interface tweak of nbd_client_new
  nbd: Coroutine based nbd_send_negotiate

 blockdev-nbd.c      |  5 ++-
 include/block/nbd.h |  6 ++--
 nbd.c               | 87 ++++++++++++++++++++++++++++++++++++++++-------------
 qemu-nbd.c          | 16 +++++-----
 4 files changed, 81 insertions(+), 33 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-11  3:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-30  5:49 [Qemu-devel] [PATCH 0/2] nbd: Async built-in server negotiation Fam Zheng
2015-12-30  5:49 ` [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new Fam Zheng
2016-01-08 16:24   ` Daniel P. Berrange
2016-01-08 18:24     ` Paolo Bonzini
2016-01-11  3:20       ` Fam Zheng
2015-12-30  5:49 ` [Qemu-devel] [PATCH 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).