]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: fib_rules: annotate data-races around rule->[io]ifindex
authorEric Dumazet <edumazet@google.com>
Thu, 6 Feb 2025 08:30:51 +0000 (08:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:16 +0000 (14:01 +0100)
commit889e6b42a4793b7afd36e4a42b767b4a7c921432
treeed4ef7cadbd6ee2abd16785114d312c05cd6367e
parentb58f7ca86a7b8e480c06e30c5163c5d2f4e24023
net: fib_rules: annotate data-races around rule->[io]ifindex

[ Upstream commit cb827db50a88aebec516151681adb6db10b688ee ]

rule->iifindex and rule->oifindex can be read without holding RTNL.

Add READ_ONCE()/WRITE_ONCE() annotations where needed.

Fixes: 32affa5578f0 ("fib: rules: no longer hold RTNL in fib_nl_dumprule()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250206083051.2494877-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/fib_rules.c