summaryrefslogtreecommitdiff
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-03-15 10:37:34 +0300
committerJakub Kicinski <kuba@kernel.org>2023-03-15 10:37:34 +0300
commit575942a2e2d311c7f5abe17f9958abab45604cbd (patch)
tree0611835d7b618d97f31bdc1a592542c5352b636f /net/ipv4/fib_semantics.c
parent68a84a127bb07d2a47e95c808520f742c54781c7 (diff)
parentc486640aa710ddd06c13a7f7162126e1552e8842 (diff)
downloadlinux-575942a2e2d311c7f5abe17f9958abab45604cbd.tar.xz
Merge branch 'ipv6-optimize-rt6_score_route'
Eric Dumazet says: ==================== ipv6: optimize rt6_score_route() This patch series remove an expensive rwlock acquisition in rt6_check_neigh()/rt6_score_route(). First patch adds missing annotations, and second patch implements the optimization. ==================== Link: https://lore.kernel.org/r/20230313201732.887488-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r--net/ipv4/fib_semantics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 3bb890a40ed7..574ff450c4d2 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -563,7 +563,7 @@ static int fib_detect_death(struct fib_info *fi, int order,
n = NULL;
if (n) {
- state = n->nud_state;
+ state = READ_ONCE(n->nud_state);
neigh_release(n);
} else {
return 0;
@@ -2202,7 +2202,7 @@ static bool fib_good_nh(const struct fib_nh *nh)
else
n = NULL;
if (n)
- state = n->nud_state;
+ state = READ_ONCE(n->nud_state);
rcu_read_unlock_bh();
}