Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758169AbZJTBNU (ORCPT ); Mon, 19 Oct 2009 21:13:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758125AbZJTBNU (ORCPT ); Mon, 19 Oct 2009 21:13:20 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:55830 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758122AbZJTBNT (ORCPT ); Mon, 19 Oct 2009 21:13:19 -0400 Date: Mon, 19 Oct 2009 18:13:41 -0700 (PDT) Message-Id: <20091019.181341.104579802.davem@davemloft.net> To: asinha@zeugmasystems.com Cc: oleg@redhat.com, ani@anirban.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] Re: Kernel oops when clearing bgp neighbor info with TCP MD5SUM enabled From: David Miller In-Reply-To: References: <20091019121327.GA11423@redhat.com> X-Mailer: Mew version 6.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2110 Lines: 58 From: Anirban Sinha Date: Mon, 19 Oct 2009 18:08:21 -0700 (PDT) > @@ -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 > } This has been fixed in the tree for a month of so: commit 657e9649e745b06675aa5063c84430986cdc3afa Author: Robert Varga Date: Tue Sep 15 23:49:21 2009 -0700 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 Signed-off-by: David S. Miller diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 045bcfd..624c3c9 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -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 } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/