diff options
Diffstat (limited to 'net/batman-adv/gateway_client.c')
-rw-r--r-- | net/batman-adv/gateway_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index a44dff3efb7f..ab597c4f9ddd 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c | |||
@@ -86,7 +86,7 @@ static void gw_select(struct bat_priv *bat_priv, struct gw_node *new_gw_node) | |||
86 | if (new_gw_node && !atomic_inc_not_zero(&new_gw_node->refcount)) | 86 | if (new_gw_node && !atomic_inc_not_zero(&new_gw_node->refcount)) |
87 | new_gw_node = NULL; | 87 | new_gw_node = NULL; |
88 | 88 | ||
89 | curr_gw_node = bat_priv->curr_gw; | 89 | curr_gw_node = rcu_dereference_protected(bat_priv->curr_gw, 1); |
90 | rcu_assign_pointer(bat_priv->curr_gw, new_gw_node); | 90 | rcu_assign_pointer(bat_priv->curr_gw, new_gw_node); |
91 | 91 | ||
92 | if (curr_gw_node) | 92 | if (curr_gw_node) |