From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP1Zu-0006jJ-Dd for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:58:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP1Zq-00027w-AW for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:58:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP1Zq-00027r-4M for qemu-devel@nongnu.org; Mon, 18 Jul 2016 01:58:50 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 52520C00FBBA for ; Mon, 18 Jul 2016 05:58:49 +0000 (UTC) References: <1468572107-23977-1-git-send-email-pbonzini@redhat.com> From: Jason Wang Message-ID: <578C7015.4070902@redhat.com> Date: Mon, 18 Jul 2016 13:58:45 +0800 MIME-Version: 1.0 In-Reply-To: <1468572107-23977-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 argument to iov_to_buf 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:41, Paolo Bonzini wrote: > Coverity reports a "suspicious sizeof" which is indeed wrong. > > Signed-off-by: Paolo Bonzini > --- > net/eth.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/eth.c b/net/eth.c > index 95fe15c..0be59c2 100644 > --- a/net/eth.c > +++ b/net/eth.c > @@ -418,7 +418,7 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, i= nt pkt_frags, > =20 > bytes_read =3D iov_to_buf(pkt, pkt_frags, > rthdr_offset + sizeof(*ext_hdr), > - dst_addr, sizeof(dst_addr)); > + dst_addr, sizeof(*dst_addr)); > =20 > return bytes_read =3D=3D sizeof(dst_addr); > } > @@ -467,7 +467,7 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, i= nt pkt_frags, > =20 > bytes_read =3D iov_to_buf(pkt, pkt_frags, > opt_offset + sizeof(opthdr), > - src_addr, sizeof(src_addr)); > + src_addr, sizeof(*src_addr)); > =20 > return bytes_read =3D=3D sizeof(src_addr); > } Applied to -net. Thanks