From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: eblake@redhat.com, vsementsov@virtuozzo.com, den@openvz.org
Subject: [Qemu-devel] [PATCH 2/2] nbd/server: add assert to nbd_negotiate_handle_info
Date: Wed, 1 Nov 2017 18:42:04 +0300 [thread overview]
Message-ID: <20171101154204.27146-2-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20171101154204.27146-1-vsementsov@virtuozzo.com>
Add an assert here to make last length assignment meaningful and
following return without tail dropping obvious.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
nbd/server.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/nbd/server.c b/nbd/server.c
index 7fcec0af7e..bcf0cdb47c 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -423,6 +423,7 @@ static int nbd_negotiate_handle_info(NBDClient *client, uint32_t length,
break;
}
}
+ assert(length == 0);
exp = nbd_export_find(name);
if (!exp) {
--
2.11.1
next prev parent reply other threads:[~2017-11-01 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 15:42 [Qemu-devel] [PATCH 1/2] nbd/server: fix nbd_negotiate_handle_info Vladimir Sementsov-Ogievskiy
2017-11-01 15:42 ` Vladimir Sementsov-Ogievskiy [this message]
2017-11-02 18:06 ` [Qemu-devel] [PATCH 2/2] nbd/server: add assert to nbd_negotiate_handle_info Eric Blake
2017-11-03 5:50 ` Vladimir Sementsov-Ogievskiy
2017-11-02 17:54 ` [Qemu-devel] [PATCH 1/2] nbd/server: fix nbd_negotiate_handle_info Eric Blake
2017-11-03 5:41 ` Vladimir Sementsov-Ogievskiy
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=20171101154204.27146-2-vsementsov@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=den@openvz.org \
--cc=eblake@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).