From: "David S. Miller" <davem@redhat.com>
To: Steve Hill <steve@navaho.co.uk>
Cc: netdev@oss.sgi.com
Subject: Re: 2.6.0-test9 : bridge freezes
Date: Mon, 15 Dec 2003 17:17:32 -0800 [thread overview]
Message-ID: <20031215171732.4877acd1.davem@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0312151304350.8670-200000@sorbus2.navaho>
On Mon, 15 Dec 2003 13:15:44 +0000 (GMT)
Steve Hill <steve@navaho.co.uk> wrote:
> The memory that is leaking seems to be being allocated on line 299 on
> net/bridge/br_netfilter.c:
>
> if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)
> return NF_DROP;
>
> Only the first fragment gets freed later on.
I see.
> The patch attached fixes the problem by freeing nf_bridge when the
> packets are defragmented, however I am sure this is not the right place
> to do this. Where would the skb's for the fragments usually get freed?
>
> Bart De Schuymer suggested that they should be freed in
> skbuff.c::skb_release_data(), but having looked at this it seems to do
> this already. skb_release_data() calls skb_drop_fraglist(), which does
> kfree_skb() on each fragment, and kfree_skb calls nf_bridge_put correctly
> so this isn't the problem.
There must be something in particular that the IPV4 fragmentation code
is doing that makes these fragment reference drops get forgotten. Hmmm...
I just noticed that both bridge netfilter and IPV4 fragmentation make much
use of the skb->cb[] control block, this may be the true source of the
troubles.
In fact, since bridge netfilter expects pointers to be there, I'm surprised
this does not cause a crash.
next prev parent reply other threads:[~2003-12-16 1:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-15 13:15 2.6.0-test9 : bridge freezes Steve Hill
2003-12-16 1:17 ` David S. Miller [this message]
2003-12-16 7:43 ` Bart De Schuymer
2003-12-16 7:46 ` David S. Miller
2003-12-16 9:00 ` Steve Hill
2003-12-16 21:46 ` Bart De Schuymer
2003-12-16 21:49 ` David S. Miller
2003-12-17 8:36 ` Steve Hill
2003-12-17 18:27 ` Bart De Schuymer
[not found] <200311221527.UAA29684@eis.iisc.ernet.in>
2003-11-22 16:20 ` Linus Torvalds
2003-11-23 23:26 ` David S. Miller
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=20031215171732.4877acd1.davem@redhat.com \
--to=davem@redhat.com \
--cc=netdev@oss.sgi.com \
--cc=steve@navaho.co.uk \
/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).