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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:58:55 +0000 (11:58 +0100)
commit39fc39a0c5907a07b8505f73b11532b72ed6e9c4
treee172bccf83c001e28130b923753d25312599acdb
parent6965d1d86c8e495c9a319c536711a5a0387d1899
udp: move udp->no_check6_tx to udp->udp_flags

[ Upstream commit a0002127cd746fcaa182ad3386ef6931c37f3bda ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/udp.h
net/ipv4/udp.c
net/ipv6/udp.c