]> git.ipfire.org Git - thirdparty/linux.git/commit
net: dst: annotate data-races around dst->input
authorEric Dumazet <edumazet@google.com>
Mon, 30 Jun 2025 12:19:28 +0000 (12:19 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Jul 2025 21:32:29 +0000 (14:32 -0700)
commitf1c5fd34891a1c242885f48c2e4dc52df180f311
tree57b3b2594bd1abb26ae65a0c65fcdb2a571900a1
parent8f2b2282d04a5d5bcbec22f91572bb6803cfc771
net: dst: annotate data-races around dst->input

dst_dev_put() can overwrite dst->input while other
cpus might read this field (for instance from dst_input())

Add READ_ONCE()/WRITE_ONCE() annotations to suppress
potential issues.

We will likely need full RCU protection later.

Fixes: 4a6ce2b6f2ec ("net: introduce a new function dst_dev_put()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250630121934.3399505-5-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dst.h
include/net/lwtunnel.h
net/core/dst.c
net/ipv4/route.c