diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2015-07-14 15:35:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-16 06:33:39 +0200 |
commit | 6640e673c6f3dbaace085ca2686a8a343dc23a71 (patch) | |
tree | 54c6f43e8d9b0e47dbab468aa2daa693ada3277d /drivers/net/ipvlan/ipvlan_core.c | |
parent | ipvlan: plug memory leak in ipvlan_link_delete (diff) | |
download | linux-6640e673c6f3dbaace085ca2686a8a343dc23a71.tar.xz linux-6640e673c6f3dbaace085ca2686a8a343dc23a71.zip |
ipvlan: unhash addresses without synchronize_rcu
All structures used in traffic forwarding are rcu-protected:
ipvl_addr, ipvl_dev and ipvl_port. Thus we can unhash addresses
without synchronization. We'll anyway hash it back into the same
bucket: in worst case lockless lookup will scan hash once again.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_core.c')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c index 8afbedad620d..8f8628a0adba 100644 --- a/drivers/net/ipvlan/ipvlan_core.c +++ b/drivers/net/ipvlan/ipvlan_core.c @@ -85,11 +85,9 @@ void ipvlan_ht_addr_add(struct ipvl_dev *ipvlan, struct ipvl_addr *addr) hlist_add_head_rcu(&addr->hlnode, &port->hlhead[hash]); } -void ipvlan_ht_addr_del(struct ipvl_addr *addr, bool sync) +void ipvlan_ht_addr_del(struct ipvl_addr *addr) { hlist_del_init_rcu(&addr->hlnode); - if (sync) - synchronize_rcu(); } struct ipvl_addr *ipvlan_find_addr(const struct ipvl_dev *ipvlan, |