From: David Miller <davem@davemloft.net>
To: gl@dsa-ac.de
Cc: samuel@sortiz.org, irda-users@lists.sourceforge.net,
netdev@vger.kernel.org, paulus@samba.org
Subject: Re: [irda-users] [2.6.20-rt8] "Neighbour table overflow."
Date: Sat, 24 Mar 2007 22:10:34 -0700 (PDT) [thread overview]
Message-ID: <20070324.221034.45741983.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0703231309170.534@pcgl.dsa-ac.de>
From: Guennadi Liakhovetski <gl@dsa-ac.de>
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. :(
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'm really surprised this leak doesn't trigger already via the
ppp_synctty.c and ppp_async.c drivers, perhaps they do something to
make sure the transmitter gets purged properly when unregistering and
therefore ->xmit_pending does not get left non-NULL at unregister
time.
next prev parent reply other threads:[~2007-03-25 5:10 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 [this message]
[not found] ` <20070324.221034.45741983.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-03-25 23:50 ` Samuel Ortiz
2007-03-26 1:36 ` [irda-users] " 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=20070324.221034.45741983.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=gl@dsa-ac.de \
--cc=irda-users@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=samuel@sortiz.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).