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

ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()

Commit e18b353f ("ipvlan: add cond_resched_rcu() while
processing muticast backlog") added a cond_resched_rcu() in a loop
using rcu protection to iterate over slaves.

This is breaking rcu rules, so lets instead use cond_resched()
at a point we can reschedule

Fixes: e18b353f ("ipvlan: add cond_resched_rcu() while processing muticast backlog")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 018d26fc
...@@ -277,7 +277,6 @@ void ipvlan_process_multicast(struct work_struct *work) ...@@ -277,7 +277,6 @@ void ipvlan_process_multicast(struct work_struct *work)
} }
ipvlan_count_rx(ipvlan, len, ret == NET_RX_SUCCESS, true); ipvlan_count_rx(ipvlan, len, ret == NET_RX_SUCCESS, true);
local_bh_enable(); local_bh_enable();
cond_resched_rcu();
} }
rcu_read_unlock(); rcu_read_unlock();
...@@ -294,6 +293,7 @@ void ipvlan_process_multicast(struct work_struct *work) ...@@ -294,6 +293,7 @@ void ipvlan_process_multicast(struct work_struct *work)
} }
if (dev) if (dev)
dev_put(dev); dev_put(dev);
cond_resched();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册