qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed negotiation
Date: Mon, 29 May 2017 07:36:12 -0500
User-agent: 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
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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]