]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
ipv4: only create late gso-skb if skb is already set up with CHECKSUM_PARTIAL
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Mon, 22 Feb 2016 17:43:25 +0000 (18:43 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:27:32 +0000 (10:27 +0100)
commit0dfaf798f966fd5d1c794bba263e6cf0fa7a562b
tree5de92c3d87c2d54d8695b9fd433a3f73fd57b888
parent385df02df41b291c31cfba4e355677e696df0670
ipv4: only create late gso-skb if skb is already set up with CHECKSUM_PARTIAL

BugLink: http://bugs.launchpad.net/bugs/1558025
Otherwise we break the contract with GSO to only pass CHECKSUM_PARTIAL
skbs down. This can easily happen with UDP+IPv4 sockets with the first
MSG_MORE write smaller than the MTU, second write is a sendfile.

Returning -EOPNOTSUPP lets the callers fall back into normal sendmsg path,
were we calculate the checksum manually during copying.

Commit d749c9cbffd6 ("ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked
sockets") started to exposes this bug.

Fixes: d749c9cbffd6 ("ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked sockets")
Reported-by: Jiri Benc <jbenc@redhat.com>
Cc: Jiri Benc <jbenc@redhat.com>
Reported-by: Wakko Warner <wakko@animx.eu.org>
Cc: Wakko Warner <wakko@animx.eu.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a8c4a2522a0808c5c2143612909717d1115c40cf)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
net/ipv4/ip_output.c