qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, pl@kamp.de, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH 1/4] nbd: Fix bad flag detection on server
Date: Thu, 21 Jul 2016 13:34:45 -0600	[thread overview]
Message-ID: <1469129688-22848-2-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1469129688-22848-1-git-send-email-eblake@redhat.com>

Commit ab7c548e added a check for invalid flags, but used an
early return on error instead of properly going through the
cleanup label.

Signed-off-by: Eric Blake <eblake@redhat.com>

---
v1: extract from larger series
previously 1/14 of v5 NBD write zeroes series
v4: new patch
---
 nbd/server.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nbd/server.c b/nbd/server.c
index 29e2099..3c1e2b3 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1057,7 +1057,8 @@ static ssize_t nbd_co_receive_request(NBDRequest *req,
     if (request->type & ~NBD_CMD_MASK_COMMAND & ~NBD_CMD_FLAG_FUA) {
         LOG("unsupported flags (got 0x%x)",
             request->type & ~NBD_CMD_MASK_COMMAND);
-        return -EINVAL;
+        rc = -EINVAL;
+        goto out;
     }

     rc = 0;
-- 
2.5.5

  reply	other threads:[~2016-07-21 19:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 19:34 [Qemu-devel] [PATCH for-2.7 0/4] NBD and block alignment fixes Eric Blake
2016-07-21 19:34 ` Eric Blake [this message]
2016-07-21 19:34 ` [Qemu-devel] [PATCH 2/4] nbd: Limit nbdflags to 16 bits Eric Blake
2016-08-01  9:17   ` Paolo Bonzini
2016-08-01 11:43     ` Eric Blake
2016-08-01 11:50       ` Paolo Bonzini
2016-07-21 19:34 ` [Qemu-devel] [PATCH 3/4] osdep: Document differences in rounding macros Eric Blake
2016-08-01  9:19   ` Paolo Bonzini
2016-07-21 19:34 ` [Qemu-devel] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard Eric Blake
2016-07-26 13:28   ` Stefan Hajnoczi
2016-07-27  7:25   ` Fam Zheng
2016-07-28  2:39     ` Eric Blake
2016-08-01  9:22       ` Paolo Bonzini
2016-10-25 12:03         ` Peter Lieven
2016-10-25 12:09           ` Paolo Bonzini
2016-10-25 12:12             ` Peter Lieven
2016-10-25 12:19               ` Paolo Bonzini
2016-10-25 12:42                 ` Peter Lieven
2016-10-25 13:59                   ` Eric Blake
2016-10-25 14:20                     ` Peter Lieven
2016-10-25 14:35                       ` Eric Blake
2016-10-25 14:36                         ` Paolo Bonzini
2016-10-25 16:12                           ` Eric Blake
2016-11-08 11:03                             ` Peter Lieven
2016-11-08 16:43                               ` Eric Blake
2016-11-11  4:02                               ` Eric Blake
2016-07-27  7:26 ` [Qemu-devel] [PATCH for-2.7 0/4] NBD and block alignment fixes 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=1469129688-22848-2-git-send-email-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --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).