[ Upstream commit da7c956101 ]
Packet socket option po->has_vnet_hdr can be updated concurrently with
other operations if no ring is attached.
Do not test the option twice in packet_snd, as the value may change in
between calls. A race on setsockopt disable may cause a packet > mtu
to be sent without having GSO options set.
Fixes: bfd5f4a3d6 ("packet: Add GSO/csum offload support.")
Signed-off-by: Willem de Bruijn <firstname.lastname@example.org>
Reviewed-by: Eric Dumazet <email@example.com>
Signed-off-by: David S. Miller <firstname.lastname@example.org>
Signed-off-by: Greg Kroah-Hartman <email@example.com>