[lkml]   [2009]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 30/37] tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
    2.6.31-stable review patch.  If anyone has any objections, please let us know.

    From: Robert Varga <>

    [ Upstream commit 657e9649e745b06675aa5063c84430986cdc3afa ]

    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, 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 <>
    Signed-off-by: Greg Kroah-Hartman <>
    net/ipv4/tcp_minisocks.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- 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();

     \ /
      Last update: 2009-10-10 02:03    [W:0.130 / U:4.820 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site