summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSorin Dumitru <sorin@returnze.ro>2015-05-26 10:42:04 +0300
committerDavid S. Miller <davem@davemloft.net>2015-05-27 13:33:21 -0400
commit14e1d0fa97f821b42e8683500cf4ec817bb5d940 (patch)
tree213d748de6b02020fa76c0cf9309755a798f4fd1 /drivers
parent07f4c90062f8fc7c8c26f8f95324cbe8fa3145a5 (diff)
downloadblackbird-op-linux-14e1d0fa97f821b42e8683500cf4ec817bb5d940.tar.gz
blackbird-op-linux-14e1d0fa97f821b42e8683500cf4ec817bb5d940.zip
vxlan: release lock after each bucket in vxlan_cleanup
We're seeing some softlockups from this function when there are a lot fdb entries on a vxlan device. Taking the lock for each bucket instead of the whole table is enough to fix that. Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/vxlan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 5eddbc02c6c2..34c519eb1db5 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2131,9 +2131,10 @@ static void vxlan_cleanup(unsigned long arg)
if (!netif_running(vxlan->dev))
return;
- spin_lock_bh(&vxlan->hash_lock);
for (h = 0; h < FDB_HASH_SIZE; ++h) {
struct hlist_node *p, *n;
+
+ spin_lock_bh(&vxlan->hash_lock);
hlist_for_each_safe(p, n, &vxlan->fdb_head[h]) {
struct vxlan_fdb *f
= container_of(p, struct vxlan_fdb, hlist);
@@ -2152,8 +2153,8 @@ static void vxlan_cleanup(unsigned long arg)
} else if (time_before(timeout, next_timer))
next_timer = timeout;
}
+ spin_unlock_bh(&vxlan->hash_lock);
}
- spin_unlock_bh(&vxlan->hash_lock);
mod_timer(&vxlan->age_timer, next_timer);
}
OpenPOWER on IntegriCloud