diff options
author | David S. Miller <davem@davemloft.net> | 2016-02-23 06:09:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-23 06:09:14 +0100 |
commit | b633353115e352d3c31c12d4c61978c810f05ea1 (patch) | |
tree | 055174a1b31a3e10fd2c505788fe6487b0028d00 /net/batman-adv/gateway_client.c | |
parent | tools, bpf_asm: simplify parser rule for BPF extensions (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-b633353115e352d3c31c12d4c61978c810f05ea1.tar.xz linux-b633353115e352d3c31c12d4c61978c810f05ea1.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/phy/bcm7xxx.c
drivers/net/phy/marvell.c
drivers/net/vxlan.c
All three conflicts were cases of simple overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/gateway_client.c')
-rw-r--r-- | net/batman-adv/gateway_client.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index 261866e38502..4b598bd531ea 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@ -545,11 +545,12 @@ void batadv_gw_node_update(struct batadv_priv *bat_priv, * gets dereferenced. */ spin_lock_bh(&bat_priv->gw.list_lock); - hlist_del_init_rcu(&gw_node->list); + if (!hlist_unhashed(&gw_node->list)) { + hlist_del_init_rcu(&gw_node->list); + batadv_gw_node_free_ref(gw_node); + } spin_unlock_bh(&bat_priv->gw.list_lock); - batadv_gw_node_free_ref(gw_node); - curr_gw = batadv_gw_get_selected_gw_node(bat_priv); if (gw_node == curr_gw) batadv_gw_reselect(bat_priv); |