]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
udp: add missing WRITE_ONCE() around up->encap_rcv
authorEric Dumazet <edumazet@google.com>
Tue, 12 Sep 2023 09:17:25 +0000 (09:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:56:47 +0000 (11:56 +0100)
commitf835f0c6252c2dcc5ecce91173758e5a8b65ab27
tree8a9abc1bb41eceb829275b865bac1b60bc2443fe
parent71e5417cee0fbdda7b69b14746306c22f050776d
udp: add missing WRITE_ONCE() around up->encap_rcv

[ Upstream commit 6d5a12eb91224d707f8691dccb40a5719fe5466d ]

UDP_ENCAP_ESPINUDP_NON_IKE setsockopt() writes over up->encap_rcv
while other cpus read it.

Fixes: 067b207b281d ("[UDP]: Cleanup UDP encapsulation code")
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>
net/ipv4/udp.c