udp: move udp->no_check6_tx to udp->udp_flags
authorEric Dumazet <edumazet@google.com>
Tue, 12 Sep 2023 09:17:22 +0000 (09:17 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Sep 2023 14:16:36 +0000 (16:16 +0200)
commita0002127cd746fcaa182ad3386ef6931c37f3bda
tree1ca047f95b208c0a963c879e2f363c0957aad670
parent81b36803ac139827538ac5ce4028e750a3c53f53
udp: move udp->no_check6_tx to udp->udp_flags

syzbot reported that udp->no_check6_tx can be read locklessly.
Use one atomic bit from udp->udp_flags

Fixes: 1c19448c9ba6 ("net: Make enabling of zero UDP6 csums more restrictive")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/linux/udp.h
net/ipv4/udp.c
net/ipv6/udp.c