]> 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:51:52 +0000 (11:51 +0100)
commita08ff0544b92b543334b22d718d0ae7e4970761f
treec43e1bc55fa0d06cc499b7fa1e64c28188fefe9f
parentec18d7507f9d9bd091c02e900722a48263955144
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