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:58:56 +0000 (11:58 +0100)
commit268e92e323039f49490d3ad2413d535c8ea2847f
treed1cf442dd7d6bf3a30ac886dd3663cda7c1a6a1f
parent67188b2e28dacddf0d85777eca8ce4c2eadde03a
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