提交 f8c31c8f 编写于 作者: H Hannes Frederic Sowa 提交者: David S. Miller

ipv6: protect for_each_sk_fl_rcu in mem_check with rcu_read_lock_bh

Fixes a suspicious rcu derference warning.

Cc: Florent Fourcot <florent.fourcot@enst-bretagne.fr>
Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e267cb96
......@@ -457,8 +457,10 @@ static int mem_check(struct sock *sk)
if (room > FL_MAX_SIZE - FL_MAX_PER_SOCK)
return 0;
rcu_read_lock_bh();
for_each_sk_fl_rcu(np, sfl)
count++;
rcu_read_unlock_bh();
if (room <= 0 ||
((count >= FL_MAX_PER_SOCK ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册