]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gro: Enter slow-path if there is no tailroom
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 10 Jan 2017 20:24:01 +0000 (12:24 -0800)
committerJiri Slaby <jslaby@suse.cz>
Thu, 26 Jan 2017 16:40:27 +0000 (17:40 +0100)
commit40e60967a4521c3706da84e5cef49eef4c977d45
treeada8a5586791051394519f0556e64a71b4b863d3
parentf075c74862ae82c487b5070bbb0e33feec95e13b
gro: Enter slow-path if there is no tailroom

[ Upstream commit 1272ce87fa017ca4cf32920764d879656b7a005a ]

The GRO path has a fast-path where we avoid calling pskb_may_pull
and pskb_expand by directly accessing frag0.  However, this should
only be done if we have enough tailroom in the skb as otherwise
we'll have to expand it later anyway.

This patch adds the check by capping frag0_len with the skb tailroom.

Fixes: cb18978cbf45 ("gro: Open-code final pskb_may_pull")
Reported-by: Slava Shwartsman <slavash@mellanox.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/core/dev.c