]> git.baikalelectronics.ru Git - kernel.git/commit
net: add missing bh_unlock_sock() calls
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 2 Nov 2011 12:42:56 +0000 (12:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Nov 2011 22:06:18 +0000 (18:06 -0400)
commitb9cf86b1b961b33ad19b4e0ae998d8a11df5afc4
tree53275f3622cf13f57296481a556c47dd5d92f16f
parent12783de7510d8e87196f8fea8f5ead5c0aa870a9
net: add missing bh_unlock_sock() calls

Simon Kirby reported lockdep warnings and following messages :

[104661.897577] huh, entered softirq 3 NET_RX ffffffff81613740
preempt_count 00000101, exited with 00000102?

[104661.923653] huh, entered softirq 3 NET_RX ffffffff81613740
preempt_count 00000101, exited with 00000102?

Problem comes from commit 379ee2bf
(ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)

If inet_csk_route_child_sock() returns NULL, we should release socket
lock before freeing it.

Another lock imbalance exists if __inet_inherit_port() returns an error
since commit 5da941f111d4 ( tproxy: fix hash locking issue when using
port redirection in __inet_inherit_port()) a backport is also needed for
>= 2.6.37 kernels.

Reported-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Balazs Scheidler <bazsi@balabit.hu>
CC: KOVACS Krisztian <hidden@balabit.hu>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ipv4.c
net/ipv4/tcp_ipv4.c