From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH v2 0/2] nbd: Async built-in server negotiation
Date: Mon, 11 Jan 2016 11:36:11 +0800 [thread overview]
Message-ID: <1452483373-22471-1-git-send-email-famz@redhat.com> (raw)
v2: Adopt Daniel and Paolo's idea: always call close_fn.
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: Always call "close_fn" in nbd_client_new
nbd: Coroutine based nbd_send_negotiate
blockdev-nbd.c | 5 ++--
include/block/nbd.h | 3 +--
nbd.c | 73 ++++++++++++++++++++++++++++++++++++++---------------
qemu-nbd.c | 10 +++-----
4 files changed, 58 insertions(+), 33 deletions(-)
--
2.4.3
next reply other threads:[~2016-01-11 3:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 3:36 Fam Zheng [this message]
2016-01-11 3:36 ` [Qemu-devel] [PATCH v2 1/2] nbd: Always call "close_fn" in nbd_client_new Fam Zheng
2016-01-11 3:36 ` [Qemu-devel] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng
2016-01-11 14:00 ` Paolo Bonzini
2016-01-12 11:44 ` Fam Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452483373-22471-1-git-send-email-famz@redhat.com \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).