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

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

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

We will likely need RCU protection in the future.

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-6-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