[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: Fully initialize client in ca
Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed negotiation
Mon, 29 May 2017 07:36:12 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0
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 <address@hidden>
> 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
qemu-nbd: nbd/server.c:521: nbd_client_put: Assertion `client->closing'
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
Description: OpenPGP digital signature