OSDN Git Service

net: avoid skb_warn_bad_offload on IS_ERR
authorWillem de Bruijn <willemb@google.com>
Tue, 12 Dec 2017 16:39:04 +0000 (11:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:03:37 +0000 (11:03 +0100)
commitc1eb38748c284e318699ae2d35b53ef7308fcd9d
tree87ec287e74add5ca363a0814338946c92cd00a0d
parent4b1932a19b9d2e09ee1a45c90fb43e1e72928032
net: avoid skb_warn_bad_offload on IS_ERR

commit 8d74e9f88d65af8bb2e095aff506aa6eac755ada upstream.

skb_warn_bad_offload warns when packets enter the GSO stack that
require skb_checksum_help or vice versa. Do not warn on arbitrary
bad packets. Packet sockets can craft many. Syzkaller was able to
demonstrate another one with eth_type games.

In particular, suppress the warning when segmentation returns an
error, which is for reasons other than checksum offload.

See also commit 36c92474498a ("net: WARN if skb_checksum_help() is
called on skb requiring segmentation") for context on this warning.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/dev.c