diff options
author | Robert Varga <nite@hq.alert.sk> | 2009-09-16 02:49:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-16 02:49:21 -0400 |
commit | 657e9649e745b06675aa5063c84430986cdc3afa (patch) | |
tree | 2db388ddc152c1deb4903467d9012c56b5ba8b41 /net | |
parent | 7c64b9f3f584008000cf3b960f25cd6a68fce191 (diff) |
tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
I have recently came across a preemption imbalance detected by:
<4>huh, entered ffffffff80644630 with preempt_count 00000102, exited with 00000101?
<0>------------[ cut here ]------------
<2>kernel BUG at /usr/src/linux/kernel/timer.c:664!
<0>invalid opcode: 0000 [1] PREEMPT SMP
with ffffffff80644630 being inet_twdr_hangman().
This appeared after I enabled CONFIG_TCP_MD5SIG and played with it a
bit, so I looked at what might have caused it.
One thing that struck me as strange is tcp_twsk_destructor(), as it
calls tcp_put_md5sig_pool() -- which entails a put_cpu(), causing the
detected imbalance. Found on 2.6.23.9, but 2.6.31 is affected as well,
as far as I can tell.
Signed-off-by: Robert Varga <nite@hq.alert.sk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 045bcfd3f288..624c3c9b3c2b 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -363,7 +363,7 @@ void tcp_twsk_destructor(struct sock *sk) | |||
363 | #ifdef CONFIG_TCP_MD5SIG | 363 | #ifdef CONFIG_TCP_MD5SIG |
364 | struct tcp_timewait_sock *twsk = tcp_twsk(sk); | 364 | struct tcp_timewait_sock *twsk = tcp_twsk(sk); |
365 | if (twsk->tw_md5_keylen) | 365 | if (twsk->tw_md5_keylen) |
366 | tcp_put_md5sig_pool(); | 366 | tcp_free_md5sig_pool(); |
367 | #endif | 367 | #endif |
368 | } | 368 | } |
369 | 369 | ||