]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:46 +0000 (12:08 +0200)
commite0b8b6687b7d5c4428d9042b5963034e4bf9b995
tree0dd39b5afa2d666312a1439ac6231395c186a7d7
parent62d7cf455c887941ed6f105cd430ba04ee0b6c9f
net: dst: annotate data-races around dst->input

[ Upstream commit f1c5fd34891a1c242885f48c2e4dc52df180f311 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/dst.h
include/net/lwtunnel.h
net/core/dst.c
net/ipv4/route.c