]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: np->rxpmtu race annotation
authorEric Dumazet <edumazet@google.com>
Tue, 16 Sep 2025 16:09:44 +0000 (16:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2025 11:45:13 +0000 (12:45 +0100)
commit58894600b548f440a6c76253d356691c3eeffe02
tree8e941e4508ccab022fd4f034975a5fd46742b15a
parentac91ada020c161f8a60d16d54568750d5ec0204a
ipv6: np->rxpmtu race annotation

[ Upstream commit 9fba1eb39e2f74d2002c5cbcf1d4435d37a4f752 ]

Add READ_ONCE() annotations because np->rxpmtu can be changed
while udpv6_recvmsg() and rawv6_recvmsg() read it.

Since this is a very rarely used feature, and that udpv6_recvmsg()
and rawv6_recvmsg() read np->rxopt anyway, change the test order
so that np->rxpmtu does not need to be in a hot cache line.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250916160951.541279-4-edumazet@google.com
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/raw.c
net/ipv6/udp.c