netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	dormando <dormando@rydia.net>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: BUG: IPv4: Attempt to release TCP socket in state 1
Date: Sun, 17 Mar 2013 08:53:10 +0100	[thread overview]
Message-ID: <20130317075310.GG24041@order.stressinduktion.org> (raw)
In-Reply-To: <20130317063948.GF24041@order.stressinduktion.org>

On Sun, Mar 17, 2013 at 07:39:48AM +0100, Hannes Frederic Sowa wrote:
> On Sat, Mar 16, 2013 at 10:36:06AM -0700, Eric Dumazet wrote:
> > On Fri, 2013-03-15 at 00:19 +0100, Eric Dumazet wrote:
> > 
> > > Thanks thats really useful, we might miss to increment socket refcount
> > > in a timer setup.
> > > 
> > 
> > Hmm, please add following debugging patch as well
> > 
> > diff --git a/include/net/sock.h b/include/net/sock.h
> > index 14f6e9d..fe7c8a6 100644
> > --- a/include/net/sock.h
> > +++ b/include/net/sock.h
> > @@ -530,7 +530,9 @@ static inline void sock_hold(struct sock *sk)
> >   */
> >  static inline void __sock_put(struct sock *sk)
> >  {
> > -	atomic_dec(&sk->sk_refcnt);
> > +	int newref = atomic_dec_return(&sk->sk_refcnt);
> > +
> > +	BUG_ON(newref <= 0);
> >  }
> 
> Couldn't it also be a free from sock_wfree where the wmem accounting went
> wrong? It does not care about reference counts there.

nvm, it had to be in the stacktrace then.

      reply	other threads:[~2013-03-17  7:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.02.1303041547080.7811@localhost6.localdomain6>
2013-03-05  3:47 ` BUG: IPv4: Attempt to release TCP socket in state 1 Cong Wang
2013-03-05  5:07   ` Eric Dumazet
2013-03-05  5:44     ` dormando
2013-03-05 14:46       ` Eric Dumazet
2013-03-07  0:41         ` dormando
2013-03-07 13:46           ` Eric Dumazet
2013-03-08  7:09             ` dormando
2013-03-14 21:21             ` dormando
2013-03-14 22:56               ` Eric Dumazet
2013-03-14 23:15                 ` dormando
2013-03-14 23:19                   ` Eric Dumazet
2013-03-16 17:36                     ` Eric Dumazet
2013-03-16 17:44                       ` Eric Dumazet
2013-03-16 20:16                         ` dormando
2013-03-17  9:21                         ` dormando
2013-03-17 16:33                           ` Eric Dumazet
2013-03-17 16:52                             ` Eric Dumazet
2013-03-17 19:00                               ` Eric Dumazet
2013-03-17  6:39                       ` Hannes Frederic Sowa
2013-03-17  7:53                         ` Hannes Frederic Sowa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130317075310.GG24041@order.stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=dormando@rydia.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).