Commit 1299f7e
packet: only test po->has_vnet_hdr once in packet_snd
[ Upstream commit da7c9561015e93d10fe6aab73e9288e0d09d65a6 ]
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: bfd5f4a ("packet: Add GSO/csum offload support.")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 1b6c80e commit 1299f7e
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1717 | 1717 | | |
1718 | 1718 | | |
1719 | 1719 | | |
1720 | | - | |
| 1720 | + | |
1721 | 1721 | | |
1722 | 1722 | | |
1723 | 1723 | | |
| |||
2656 | 2656 | | |
2657 | 2657 | | |
2658 | 2658 | | |
| 2659 | + | |
2659 | 2660 | | |
2660 | 2661 | | |
2661 | 2662 | | |
| |||
2743 | 2744 | | |
2744 | 2745 | | |
2745 | 2746 | | |
| 2747 | + | |
2746 | 2748 | | |
2747 | 2749 | | |
2748 | 2750 | | |
| |||
2802 | 2804 | | |
2803 | 2805 | | |
2804 | 2806 | | |
2805 | | - | |
| 2807 | + | |
2806 | 2808 | | |
2807 | 2809 | | |
2808 | 2810 | | |
| |||
0 commit comments