From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP1aB-0007HX-Tj for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:59:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP1a7-0002Ag-Rd for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:59:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP1a7-0002Ac-Lz for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:59:07 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 266807F352 for ; Mon, 18 Jul 2016 05:59:07 +0000 (UTC) References: <1468572212-24209-1-git-send-email-pbonzini@redhat.com> From: Jason Wang Message-ID: <578C7026.2040406@redhat.com> Date: Mon, 18 Jul 2016 13:59:02 +0800 MIME-Version: 1.0 In-Reply-To: <1468572212-24209-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] net: fix incorrect access to pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org On 2016=E5=B9=B407=E6=9C=8815=E6=97=A5 16:43, Paolo Bonzini wrote: > This is not dereferencing the pointer, and instead checking only > the value of the pointer. > > Signed-off-by: Paolo Bonzini > --- > net/eth.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/eth.c b/net/eth.c > index 0be59c2..df81efb 100644 > --- a/net/eth.c > +++ b/net/eth.c > @@ -211,7 +211,7 @@ void eth_get_protocols(const struct iovec *iov, int= iovcnt, > *l4hdr_off, sizeof(l4hdr_info->h= dr.tcp), > &l4hdr_info->hdr.tcp); > =20 > - if (istcp) { > + if (*istcp) { > *l5hdr_off =3D *l4hdr_off + > TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp); > =20 Applied to -net. Thanks