From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNI6K-0001jq-Gq for qemu-devel@nongnu.org; Fri, 29 Aug 2014 05:04:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNI6E-0006uL-9W for qemu-devel@nongnu.org; Fri, 29 Aug 2014 05:04:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNI6E-0006uH-1e for qemu-devel@nongnu.org; Fri, 29 Aug 2014 05:04:02 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7T941cN007097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 29 Aug 2014 05:04:01 -0400 Date: Fri, 29 Aug 2014 10:03:59 +0100 From: Stefan Hajnoczi Message-ID: <20140829090359.GA32448@stefanha-thinkpad.redhat.com> References: <1409213061-15562-1-git-send-email-rjones@redhat.com> <1409213061-15562-2-git-send-email-rjones@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <1409213061-15562-2-git-send-email-rjones@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] curl: Don't deref NULL pointer in call to aio_poll. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 28, 2014 at 09:04:21AM +0100, Richard W.M. Jones wrote: > diff --git a/block/curl.c b/block/curl.c > index d4b85d2..f59615d 100644 > --- a/block/curl.c > +++ b/block/curl.c > @@ -352,7 +352,7 @@ static void curl_multi_timeout_do(void *arg) > #endif > } > =20 > -static CURLState *curl_init_state(BDRVCURLState *s) > +static CURLState *curl_init_state(BlockDriverState *bs, BDRVCURLState *s) > { > CURLState *state =3D NULL; > int i, j; Why add the BDRVCURLState *s argument... > @@ -370,7 +370,7 @@ static CURLState *curl_init_state(BDRVCURLState *s) > break; > } > if (!state) { > - aio_poll(state->s->aio_context, true); > + aio_poll(bdrv_get_aio_context(bs), true); > } > } while(!state); > =20 =2E..if it is not used? --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUAEH/AAoJEJykq7OBq3PIyK4H/jJyM9rJdpjoJZtSx4MXNZ0y dvwOw6997lN6sRcID3uPbewLLX1kc6AuTRqV7TTtRKEPDV0RV1zLXXQw8OBF9jaa GIXAmST5MYtSmqeoh02YWO7zk3D717/nwnrzH9RYByaR8/sK/Ao9LouENA8a5bUH zhNktT3AMHebTLm84LTngEc3h+URUvEBD+dB25fBalOgy9UKxnskJ7olP/hqjiHl UrLrYwinV/jBNTYCq8Sl+2VdFX0XinIo/MZNICJTs41SlOwHjDdxbzyoQ7MbD21a CrvudqSbLTYJTm6Q2oTOp2ypLM4SF+K5lYSXNEaZ6EnOMemXln+CCq82Eu6ShnY= =AMSi -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--