netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: gl-o/hVf8ie6tKzQB+pC5nmwQ@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [2.6.20-rt8] "Neighbour table overflow."
Date: Mon, 26 Mar 2007 02:50:59 +0300	[thread overview]
Message-ID: <20070325235058.GA3715@sortiz.org> (raw)
In-Reply-To: <20070324.221034.45741983.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Sat, Mar 24, 2007 at 10:10:34PM -0700, David Miller wrote:
> From: Guennadi Liakhovetski <gl-o/hVf8ie6tKzQB+pC5nmwQ@public.gmane.org>
> Date: Fri, 23 Mar 2007 13:14:43 +0100 (CET)
> 
> > On Wed, 21 Mar 2007, Guennadi Liakhovetski wrote:
> > 
> > > On Wed, 21 Mar 2007, Samuel Ortiz wrote:
> > >
> > >> I'm quite sure the leak is in the IrDA code rather than in the ppp or
> > >> ipv4 one, hence the need for full irda debug...
> > 
> > Well, looks like you were wrong, Samuel. Below is a patch that fixes ONE 
> > sk_buff leak (maintainer added to cc: hi, Paul:-)). Still investigating if 
> > there are more there.
> 
> This is strange.
> 
> The PPP generic layer seems to be very careful about it's handling of
> the ->xmit_pending packet.
> 
> When a packet is added to ->xmit_pending, immediately ppp_push() is
> called, and ppp_push() gives the packet to the channels xmit function,
> and unless the xmit function returns zero the ->xmit_pending is reset
> to NULL because non-zero return from the channel xmit functions means
> that the driver took the packet.
> 
> Now I checked irnet_ppp.c, which is the driver under scrutiny here,
> and it never ever returns zero, under any circumstance, it always
> return one.
> 
> So the ->xmit_pending should always be NULL'd out by ppp_push().
> 
> There is some funny BLOCK_WHEN_CONNECT code, which will return
> 0 in certain cases, but that define it never set during the
> build.
> 
> Nevermind... that code does get enabled. :(
It is enabled, yes, from net/irda/irnet/irnet.h
It seems Jean added this option to make the connectdelay 0 pppd option
working.

 
> This looks like it might be a bug, perhaps you can only return zero
> from the transmit function when your queue really is full and you plan
> to wake things up properly when space appears (via
> ppp_output_wakeup()).  You can't return 0 because of an event which
> might never occur, that's what makes ->xmit_pending get stuck and
> leak.
I still think Guennadi's fix is correct even if you return 0 from the TX
function only when you're running out of space. If we unregister the ppp
interface before we get a chance to call ppp_output_wake(), then we'll leak
an xmit_pending skb.

I guess Paul will decide here. If he rejects Guennadi's patch, I'll come
up with some IrDA patch so that we free our pending skb from the irnet code,
or try somehow not to block the PPP tx queue while connecting.

Cheers,
Samuel.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

  parent reply	other threads:[~2007-03-25 23:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mtHxbRRF.1174407786.3649450.samuel@sortiz.org>
     [not found] ` <Pine.LNX.4.63.0703201759390.534@pcgl.dsa-ac.de>
     [not found]   ` <Pine.LNX.4.63.0703210849570.534@pcgl.dsa-ac.de>
     [not found]     ` <Pine.LNX.4.63.0703210849570.534-pjC7uWgG1yLsj6RlE8knwQ@public.gmane.org>
2007-03-21 10:51       ` [2.6.20-rt8] "Neighbour table overflow." Guennadi Liakhovetski
     [not found]         ` <Pine.LNX.4.63.0703211130140.534-pjC7uWgG1yLsj6RlE8knwQ@public.gmane.org>
2007-03-21 11:26           ` Samuel Ortiz
2007-03-21 12:01             ` [irda-users] " Guennadi Liakhovetski
2007-03-23 12:14               ` Guennadi Liakhovetski
2007-03-24  0:36                 ` Samuel Ortiz
2007-03-26  8:22                   ` Guennadi Liakhovetski
2007-03-25  5:10                 ` David Miller
     [not found]                   ` <20070324.221034.45741983.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-03-25 23:50                     ` Samuel Ortiz [this message]
2007-03-26  1:36                       ` David Miller
2007-03-26  1:02                   ` Paul Mackerras
     [not found]                     ` <17927.7070.803210.600520-UYQwCShxghk5kJ7NmlRacFaTQe2KTcn/@public.gmane.org>
2007-03-26  1:37                       ` David Miller
2007-03-26  1:01                 ` [irda-users] " Paul Mackerras

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=20070325235058.GA3715@sortiz.org \
    --to=samuel-jcdqhdrhkhmdnm+yrofe0a@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=gl-o/hVf8ie6tKzQB+pC5nmwQ@public.gmane.org \
    --cc=irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    /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).