From: "Michael S. Tsirkin" <mst@redhat.com>
To: LABBE Corentin <clabbe.montjoie@gmail.com>
Cc: al.drozdov@gmail.com, daniel@iogearbox.net, davem@davemloft.net,
dwmw2@infradead.org, edumazet@google.com, eyal.birger@gmail.com,
viro@zeniv.linux.org.uk, willemb@google.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 04/11] net: packet: change vnet_hdr_len from int to size_t
Date: Fri, 23 Oct 2015 16:35:02 +0300 [thread overview]
Message-ID: <20151023163441-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1445602236-24130-5-git-send-email-clabbe.montjoie@gmail.com>
On Fri, Oct 23, 2015 at 02:10:29PM +0200, LABBE Corentin wrote:
> vnet_hdr_len cannot be negative and is use in operation/function that
> wait for unsigned value.
> This patch set vnet_hdr_len as size_t.
>
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
These things need to be done carefully.
I'll look at this next week.
> ---
> net/packet/af_packet.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
> index aa4b15c..58a5c8f 100644
> --- a/net/packet/af_packet.c
> +++ b/net/packet/af_packet.c
> @@ -2632,7 +2632,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
> int err, reserve = 0;
> struct virtio_net_hdr vnet_hdr = { 0 };
> int offset = 0;
> - int vnet_hdr_len;
> + size_t vnet_hdr_len;
> struct packet_sock *po = pkt_sk(sk);
> unsigned short gso_type = 0;
> int hlen, tlen;
> @@ -3106,7 +3106,7 @@ static int packet_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
> struct sock *sk = sock->sk;
> struct sk_buff *skb;
> int copied, err;
> - int vnet_hdr_len = 0;
> + size_t vnet_hdr_len = 0;
> unsigned int origlen = 0;
>
> err = -EINVAL;
> --
> 2.4.10
next prev parent reply other threads:[~2015-10-23 13:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 12:10 LABBE Corentin
2015-10-23 12:10 ` (unknown), LABBE Corentin
2015-10-23 12:10 ` [PATCH 01/11] net: change len parameter type for memcpy_[to|from]_msg LABBE Corentin
2015-10-23 12:10 ` [PATCH 02/11] net: llc: fix a setting of error value to size_t LABBE Corentin
2015-10-23 12:10 ` [PATCH 03/11] net: llc: change copied to size_t in llc_ui_sendmsg LABBE Corentin
2015-10-23 12:10 ` [PATCH 04/11] net: packet: change vnet_hdr_len from int to size_t LABBE Corentin
2015-10-23 13:35 ` Michael S. Tsirkin [this message]
2015-10-23 12:10 ` [PATCH 05/11] net: irda: change chunk " LABBE Corentin
2015-10-23 12:10 ` [PATCH 06/11] net: ipv6: set the length parameter of rawv6_send_hdrinc() " LABBE Corentin
2015-10-23 12:10 ` [PATCH 07/11] net: caif: change chunk from int " LABBE Corentin
2015-10-23 12:10 ` [PATCH 08/11] net: bluetooth: change the len parameter of sco_send_frame() " LABBE Corentin
2015-10-23 12:30 ` kbuild test robot
2015-10-23 12:36 ` kbuild test robot
2015-10-23 12:40 ` kbuild test robot
2015-10-25 19:54 ` Marcel Holtmann
2015-10-23 12:10 ` [PATCH 09/11] net: ipv6: hlen could be set as size_t LABBE Corentin
2015-10-23 12:33 ` kbuild test robot
2015-10-23 12:46 ` kbuild test robot
2015-10-23 12:10 ` [PATCH 10/11] net: ipv4: " LABBE Corentin
2015-10-23 12:43 ` kbuild test robot
2015-10-23 13:08 ` David Miller
2015-10-23 13:21 ` LABBE Corentin
2015-10-23 13:51 ` David Miller
2015-10-23 12:10 ` [PATCH 11/11] crypto: algif: Change some variable to size_t LABBE Corentin
2015-11-17 14:08 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151023163441-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=al.drozdov@gmail.com \
--cc=clabbe.montjoie@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=edumazet@google.com \
--cc=eyal.birger@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.