aboutsummaryrefslogtreecommitdiff
path: root/net/caif
diff options
context:
space:
mode:
authorEric Dumazet2023-12-19 12:53:31 +0000
committerGreg Kroah-Hartman2024-01-01 12:38:58 +0000
commit3e617c7e39eb6e605f86d5e726476ebd002d9ddf (patch)
treec79c35a47475424d569a32f7ed2da8941e19de73 /net/caif
parent087b96adc694d2cb54cb387c67fc585cf68397c1 (diff)
net: check dev->gso_max_size in gso_features_check()
[ Upstream commit 24ab059d2ebd62fdccc43794796f6ffbabe49ebc ] Some drivers might misbehave if TSO packets get too big. GVE for instance uses a 16bit field in its TX descriptor, and will do bad things if a packet is bigger than 2^16 bytes. Linux TCP stack honors dev->gso_max_size, but there are other ways for too big packets to reach an ndo_start_xmit() handler : virtio_net, af_packet, GRO... Add a generic check in gso_features_check() and fallback to GSO when needed. gso_max_size was added in the blamed commit. Fixes: 82cc1a7a5687 ("[NET]: Add per-connection option to set max TSO frame size") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20231219125331.4127498-1-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/caif')
0 files changed, 0 insertions, 0 deletions