[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df9815e70909080109r3d61ee76v3dcba41dbd87b998@mail.gmail.com>
Date: Tue, 8 Sep 2009 16:09:56 +0800
From: Jike Song <albcamus@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Parag Warudkar <parag.lkml@...il.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: BUG UNIX: Poison overwritten with 2.6.31-rc6-00223-g6c30c53
On Tue, Sep 8, 2009 at 3:38 PM, Eric Dumazet<eric.dumazet@...il.com> wrote:
>
> We decrement a refcnt while object already freed.
>
> (SLUB DEBUG poisons the zone with 0x6B pattern)
>
> You might add this patch to trigger a WARN_ON when refcnt >= 0x60000000U
> in sk_free() : We'll see the path trying to delete an already freed sock
>
> diff --git a/net/core/sock.c b/net/core/sock.c
> index 7633422..1cb85ff 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -1058,6 +1058,7 @@ static void __sk_free(struct sock *sk)
>
> void sk_free(struct sock *sk)
> {
> + WARN_ON(atomic_read(&sk->sk_wmem_alloc) >= 0x60000000U);
> /*
> * We substract one from sk_wmem_alloc and can know if
> * some packets are still in some tx queue.
>
>
The output of dmesg with this patch appllied is attached.
--
Thanks,
Jike
View attachment "dmesg.txt" of type "text/plain" (80605 bytes)
Powered by blists - more mailing lists