From: Daniel Borkmann <daniel@iogearbox.net>
To: Alexander Drozdov <al.drozdov@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Daniel Borkmann <dborkman@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>,
Willem de Bruijn <willemb@google.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Eyal Birger <eyal.birger@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] packet: tpacket_snd(): fix signed/unsigned comparison
Date: Tue, 28 Jul 2015 13:07:02 +0200 [thread overview]
Message-ID: <55B76256.2040105@iogearbox.net> (raw)
In-Reply-To: <1438081021-1321-1-git-send-email-al.drozdov@gmail.com>
On 07/28/2015 12:57 PM, Alexander Drozdov wrote:
> tpacket_fill_skb() can return a negative value (-errno) which
> is stored in tp_len variable. In that case the following
> condition will be (but shouldn't be) true:
>
> tp_len > dev->mtu + dev->hard_header_len
>
> as dev->mtu and dev->hard_header_len are both unsigned.
>
> That may lead to just returning an incorrect EMSGSIZE errno
> to the user.
>
> Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Looks good to me, thanks!
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
next prev parent reply other threads:[~2015-07-28 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 10:57 [PATCH] packet: tpacket_snd(): fix signed/unsigned comparison Alexander Drozdov
2015-07-28 11:07 ` Daniel Borkmann [this message]
2015-07-28 11:38 ` Eric Dumazet
2015-07-29 7:10 ` David Miller
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=55B76256.2040105@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=al.drozdov@gmail.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=edumazet@google.com \
--cc=eyal.birger@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).