|
@@ -628,12 +628,12 @@ static void update_or_create_fnhe(struct fib_nh *nh, __be32 daddr, __be32 gw,
|
|
|
|
|
|
spin_lock_bh(&fnhe_lock);
|
|
|
|
|
|
- hash = nh->nh_exceptions;
|
|
|
+ hash = rcu_dereference(nh->nh_exceptions);
|
|
|
if (!hash) {
|
|
|
hash = kzalloc(FNHE_HASH_SIZE * sizeof(*hash), GFP_ATOMIC);
|
|
|
if (!hash)
|
|
|
goto out_unlock;
|
|
|
- nh->nh_exceptions = hash;
|
|
|
+ rcu_assign_pointer(nh->nh_exceptions, hash);
|
|
|
}
|
|
|
|
|
|
hash += hval;
|
|
@@ -1242,7 +1242,7 @@ static unsigned int ipv4_mtu(const struct dst_entry *dst)
|
|
|
|
|
|
static struct fib_nh_exception *find_exception(struct fib_nh *nh, __be32 daddr)
|
|
|
{
|
|
|
- struct fnhe_hash_bucket *hash = nh->nh_exceptions;
|
|
|
+ struct fnhe_hash_bucket *hash = rcu_dereference(nh->nh_exceptions);
|
|
|
struct fib_nh_exception *fnhe;
|
|
|
u32 hval;
|
|
|
|