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

tcp: fix inet_twsk_deschedule()

Eric W. Biederman reported a lockdep splat in inet_twsk_deschedule()

This is caused by inet_twsk_purge(), run from process context,
and commit 575f4cd5 (net: Use rcu lookups in inet_twsk_purge.)
removed the BH disabling that was necessary.

Add the BH disabling but fine grained, right before calling
inet_twsk_deschedule(), instead of whole function.

With help from Linus Torvalds and Eric W. Biederman
Reported-by: NEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
CC: Daniel Lezcano <daniel.lezcano@free.fr>
CC: Pavel Emelyanov <xemul@openvz.org>
CC: Arnaldo Carvalho de Melo <acme@redhat.com>
CC: stable <stable@kernel.org> (# 2.6.33+)
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ece639ca
......@@ -505,7 +505,9 @@ void inet_twsk_purge(struct inet_hashinfo *hashinfo,
}
rcu_read_unlock();
local_bh_disable();
inet_twsk_deschedule(tw, twdr);
local_bh_enable();
inet_twsk_put(tw);
goto restart_rcu;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册