* [PATCH] fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
@ 2009-09-15 23:01 Robert Varga
2009-09-16 6:49 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Robert Varga @ 2009-09-15 23:01 UTC (permalink / raw)
To: netdev
Hi,
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>
---
--- vanilla/net/ipv4/tcp_minisocks.c 2009-09-10 00:13:59.000000000 +0200
+++ patched/net/ipv4/tcp_minisocks.c 2009-09-16 00:48:15.904089024 +0200
@@ -363,7 +363,7 @@ void tcp_twsk_destructor(struct sock *sk
#ifdef CONFIG_TCP_MD5SIG
struct tcp_timewait_sock *twsk = tcp_twsk(sk);
if (twsk->tw_md5_keylen)
- tcp_put_md5sig_pool();
+ tcp_free_md5sig_pool();
#endif
}
--
Bye,
Robert Varga
Reality continues to ruin my life. -- Calvin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
2009-09-15 23:01 [PATCH] fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG() Robert Varga
@ 2009-09-16 6:49 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-09-16 6:49 UTC (permalink / raw)
To: nite; +Cc: netdev
From: Robert Varga <nite@hq.alert.sk>
Date: Wed, 16 Sep 2009 01:01:26 +0200
> Hi,
>
> 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>
Looks good, applied and queued up for stable.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-16 6:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-15 23:01 [PATCH] fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG() Robert Varga
2009-09-16 6:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).