diff options
author | Alexander Drozdov <al.drozdov@gmail.com> | 2015-07-28 13:57:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 19:26:24 +0200 |
commit | 2ef3d434d30f074fc744f86a956239feea922b04 (patch) | |
tree | 8e7879e19b4bb0ad1a1b7b0ee8c6c10db78e5dfe /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | d339d03860f21b3f27a674312df09b6ce92c0c42 (diff) |
packet: tpacket_snd(): fix signed/unsigned comparison
[ Upstream commit dbd46ab412b8fb395f2b0ff6f6a7eec9df311550 ]
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.
Fixes: 52f1454f629fa ("packet: allow to transmit +4 byte in TX_RING slot for VLAN case")
Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions