diff options
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index cead606008a1..b8d3f248efdc 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -241,7 +241,8 @@ static void softif_neigh_vid_select(struct bat_priv *bat_priv, | |||
241 | if (new_neigh && !atomic_inc_not_zero(&new_neigh->refcount)) | 241 | if (new_neigh && !atomic_inc_not_zero(&new_neigh->refcount)) |
242 | new_neigh = NULL; | 242 | new_neigh = NULL; |
243 | 243 | ||
244 | curr_neigh = softif_neigh_vid->softif_neigh; | 244 | curr_neigh = rcu_dereference_protected(softif_neigh_vid->softif_neigh, |
245 | 1); | ||
245 | rcu_assign_pointer(softif_neigh_vid->softif_neigh, new_neigh); | 246 | rcu_assign_pointer(softif_neigh_vid->softif_neigh, new_neigh); |
246 | 247 | ||
247 | if ((curr_neigh) && (!new_neigh)) | 248 | if ((curr_neigh) && (!new_neigh)) |