Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-starfive.git] / net / ipv4 / fib_semantics.c
index 3bb890a..65ba18a 100644 (file)
@@ -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;
@@ -2191,7 +2191,7 @@ static bool fib_good_nh(const struct fib_nh *nh)
        if (nh->fib_nh_scope == RT_SCOPE_LINK) {
                struct neighbour *n;
 
-               rcu_read_lock_bh();
+               rcu_read_lock();
 
                if (likely(nh->fib_nh_gw_family == AF_INET))
                        n = __ipv4_neigh_lookup_noref(nh->fib_nh_dev,
@@ -2202,9 +2202,9 @@ 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();
+               rcu_read_unlock();
        }
 
        return !!(state & NUD_VALID);