]> 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)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 18 Sep 2025 08:17:09 +0000 (10:17 +0200)
commit9fba1eb39e2f74d2002c5cbcf1d4435d37a4f752
tree4cc67eb26e93c7de2a4037d044381eb74228d2cc
parent5489f333ef993bfceebce9ae98944f04eaafcc30
ipv6: np->rxpmtu race annotation

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>
net/ipv6/raw.c
net/ipv6/udp.c