提交 d43caccb 编写于 作者: E Eric Dumazet 提交者: Yang Yingliang

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

stable inclusion
from linux-4.19.111
commit cb9e7197bbebbdfd762c34f64b1e55d8b526c345

--------------------------------

[ Upstream commit afe207d8 ]

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>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NLi Aichun <liaichun@huawei.com>
Reviewed-by: Nguodeqing <geffrey.guo@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 75b31c50
......@@ -282,7 +282,6 @@ void ipvlan_process_multicast(struct work_struct *work)
}
ipvlan_count_rx(ipvlan, len, ret == NET_RX_SUCCESS, true);
local_bh_enable();
cond_resched_rcu();
}
rcu_read_unlock();
......@@ -299,6 +298,7 @@ void ipvlan_process_multicast(struct work_struct *work)
}
if (dev)
dev_put(dev);
cond_resched();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册