提交 7dbfb4ef 编写于 作者: E Eric Dumazet 提交者: David S. Miller

tun: do not block BH again in tun_flow_cleanup()

tun_flow_cleanup() being a timer callback, it is already
running in BH context.
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 02db34d0
...@@ -454,7 +454,7 @@ static void tun_flow_cleanup(unsigned long data) ...@@ -454,7 +454,7 @@ static void tun_flow_cleanup(unsigned long data)
tun_debug(KERN_INFO, tun, "tun_flow_cleanup\n"); tun_debug(KERN_INFO, tun, "tun_flow_cleanup\n");
spin_lock_bh(&tun->lock); spin_lock(&tun->lock);
for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) { for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) {
struct tun_flow_entry *e; struct tun_flow_entry *e;
struct hlist_node *n; struct hlist_node *n;
...@@ -472,7 +472,7 @@ static void tun_flow_cleanup(unsigned long data) ...@@ -472,7 +472,7 @@ static void tun_flow_cleanup(unsigned long data)
if (count) if (count)
mod_timer(&tun->flow_gc_timer, round_jiffies_up(next_timer)); mod_timer(&tun->flow_gc_timer, round_jiffies_up(next_timer));
spin_unlock_bh(&tun->lock); spin_unlock(&tun->lock);
} }
static void tun_flow_update(struct tun_struct *tun, u32 rxhash, static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册