public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dan A. Dickey" <dan.dickey@savvis.net>
To: "Marc-Christian Petersen" <m.c.p@kernel.linux-systeme.com>
Cc: <linux-kernel@vger.kernel.org>, <kuznet@ms2.inr.ac.ru>,
	<davem@redhat.com>
Subject: Re: Sock leak in net/ipv4/af_inet.c - 2.4.26
Date: Tue, 11 May 2004 12:25:37 -0500	[thread overview]
Message-ID: <200405111225.38072.dan.dickey@savvis.net> (raw)
In-Reply-To: <200405111843.50048@WOLK>

On Tuesday 11 May 2004 11:43, Marc-Christian Petersen wrote:
> On Tuesday 11 May 2004 18:24, Dickey, Dan wrote:
>
> Hi Dan,
>
> > I've found a leak in af_inet.c, routine inet_create().
> > It allocates from the sock slab using sk_alloc(), but
> > sk_free() is never called on these sock structs.
> > I'm not that familiar with the af_inet code, but I'll
> > continue taking a look at it to try and determine where
> > the missing sk_free() is supposed to be.
> > If either of you or anyone else has an idea, please
> > let me know.  We have several 2GB mem systems that need
> > to be rebooted every few days because of this problem.
> > Oh - by the way, it looks like this is happening in
> > net/ipv4/tcp_minisocks.c as well.  Routine tcp_create_openreq_child().
> > There is no corresponding sk_free() call for the sk_alloc() in here.
> > In order to track these down, I've added some simple debug code
> > around the sk_alloc/sk_free calls to track allocations.  I know
> > where the leaky sock structs are being allocated from, but not
> > where they should be freed.
>
> am I silly or do I see lots of sk_free(sk); in there?
>
> ciao, Marc

Marc,
there are zero sk_free() calls in tcp_minisocks.c and
three in af_inet.c.  Go take another look.
Remember - 2.4.26 sources.
	-Dan

-- 
Dan A. Dickey
dan.dickey@savvis.net

  reply	other threads:[~2004-05-11 17:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 16:24 Sock leak in net/ipv4/af_inet.c - 2.4.26 Dickey, Dan
2004-05-11 16:43 ` Marc-Christian Petersen
2004-05-11 17:25   ` Dan A. Dickey [this message]
2004-05-11 18:59     ` David S. Miller
2004-05-11 19:55       ` Dan A. Dickey

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=200405111225.38072.dan.dickey@savvis.net \
    --to=dan.dickey@savvis.net \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.c.p@kernel.linux-systeme.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