qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed negotiation
Date: Mon, 29 May 2017 07:36:12 -0500	[thread overview]
Message-ID: <f5978b99-f827-db0f-4e0b-b72e871529f0@redhat.com> (raw)
In-Reply-To: <20170527030421.28366-1-eblake@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

On 05/26/2017 10:04 PM, Eric Blake wrote:
> If a non-NBD client connects to qemu-nbd, we would end up with
> a SIGSEGV in nbd_cilent_put() because we were trying to
> unregister the client's association to the export, even though
> we skipped inserting the client into that list.  Easy trigger
> in two terminals:
> 
> $ qemu-nbd -p 30001 --format=raw file
> $ nmap 127.0.0.1 -p 30001
> 

> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451614
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> 
> I'm planning to run a bisect to see which patch actually introduced
> the problem, but wanted to post the patch first to get review started.

Looks like the problem of split initialization has existed since at
least 2.6; commit 1a6245a split up the QTAILQ_INSERT_TAIL and
nbd_export_get as part of refactoring to create nbd_co_client_start.
But even trying the commit before that, I still got a different
assertion failure:
qemu-nbd: nbd/server.c:521: nbd_client_put: Assertion `client->closing'
failed.

Going all the way back to 2.5 worked, but 2.6 was far enough back that I
didn't want to bisect further which commit first broke probes from nmap.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-05-29 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-27  3:04 [Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed negotiation Eric Blake
2017-05-29 12:36 ` Eric Blake [this message]
2017-06-09 11:57 ` Eric Blake

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=f5978b99-f827-db0f-4e0b-b72e871529f0@redhat.com \
    --to=eblake@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).