[lkml]   [2011]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[10/73] tcp: fix inet_twsk_deschedule()
2.6.37-stable review patch.  If anyone has any objections, please let us know.


From: Eric Dumazet <>

commit 91035f0b7d89291af728b6f3e370c3be58fcbe1b upstream.

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

This is caused by inet_twsk_purge(), run from process context,
and commit 575f4cd5a5b6394577 (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: Eric W. Biederman <>
Signed-off-by: Eric Dumazet <>
CC: Daniel Lezcano <>
CC: Pavel Emelyanov <>
CC: Arnaldo Carvalho de Melo <>
Signed-off-by: David S. Miller <>
Signed-off-by: Greg Kroah-Hartman <>

net/ipv4/inet_timewait_sock.c | 2 ++
1 file changed, 2 insertions(+)

--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -505,7 +505,9 @@ restart:

+ local_bh_disable();
inet_twsk_deschedule(tw, twdr);
+ local_bh_enable();
goto restart_rcu;

 \ /
  Last update: 2011-03-06 11:19    [W:0.020 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site