From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aORm9-0003NT-Cv for qemu-devel@nongnu.org; Wed, 27 Jan 2016 10:12:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aORm8-0004aT-CU for qemu-devel@nongnu.org; Wed, 27 Jan 2016 10:12:53 -0500 References: <1453747275-9468-1-git-send-email-mreitz@redhat.com> <1453747275-9468-2-git-send-email-mreitz@redhat.com> <20160125220550.GA7337@redhat.com> From: Max Reitz Message-ID: <56A8DE6B.4050402@redhat.com> Date: Wed, 27 Jan 2016 16:12:43 +0100 MIME-Version: 1.0 In-Reply-To: <20160125220550.GA7337@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M3JFw65GBBSRVKL3h7QVXGniAKHTPp2sW" Subject: Re: [Qemu-devel] [PATCH 1/8] nbd: client_close on error in nbd_co_client_start List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Kevin Wolf , Paolo Bonzini , Fam Zheng , qemu-devel@nongnu.org, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --M3JFw65GBBSRVKL3h7QVXGniAKHTPp2sW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 25.01.2016 23:05, Daniel P. Berrange wrote: > On Mon, Jan 25, 2016 at 07:41:08PM +0100, Max Reitz wrote: >> Use client_close() if an error in nbd_co_client_start() occurs instead= >> of manually inlining parts of it. This fixes an assertion error on the= >> server side if nbd_negotiate() fails. >> >> Signed-off-by: Max Reitz >> --- >> nbd/server.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/nbd/server.c b/nbd/server.c >> index 2265cb0..5169b59 100644 >> --- a/nbd/server.c >> +++ b/nbd/server.c >> @@ -1080,8 +1080,7 @@ static coroutine_fn void nbd_co_client_start(voi= d *opaque) >> nbd_export_get(exp); >> } >> if (nbd_negotiate(data)) { >> - shutdown(client->sock, 2); >> - client->close(client); >> + client_close(client); >> goto out; >> } >> qemu_co_mutex_init(&client->send_lock); >=20 > The same as my fix last week :-) >=20 > https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03409.html Oops, sorry. I guess that at least shows that the fix is probably good. O= :-) Max --M3JFw65GBBSRVKL3h7QVXGniAKHTPp2sW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWqN5rAAoJEDuxQgLoOKytFuUH/jsi8FpQD27qBflYhRX0IbFi IXVUcwtrOXZgA6RfViDvzyk3bpp7ueYPQOeBKZtdjLkNGSmmomDHZGEDykW9SdD9 xPn7gL4yDo9YHpHz8GMXkIMgIRjfU9nKaa5im3OEXUrG6kwflWP56Ct4yAff9C01 NmAaQXRWrFVXR1ozxFloTiVBAdhC4+asj2p1CUrxgh1z/JKbGU/X7FwYdZ/qJr/S FVQYjilJsWqQc0I4vjVrhkKlmtJ6JFGd22U4aInzSSjn0DsFTA7yh9KVmoFyPgIl ugwpHW3oKHT5/Gv0id2/GomkL8x+SXasLwOm2oYwa3HDWcxXFRUi593WCTLk/c0= =P6mC -----END PGP SIGNATURE----- --M3JFw65GBBSRVKL3h7QVXGniAKHTPp2sW--