netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Subject: Re: [Bugme-new] [Bug 9758] New: net_device refcnt bug when NFQUEUEing bridged packets
Date: Wed, 16 Jan 2008 10:56:32 -0800	[thread overview]
Message-ID: <20080116105632.2532812c@speedy> (raw)
In-Reply-To: <478D8F29.5040703@trash.net>

On Wed, 16 Jan 2008 05:59:21 +0100
Patrick McHardy <kaber@trash.net> wrote:

> Patrick McHardy wrote:
> > Very nice catch, that explains quite a few bug reports about
> > refcnt leaks. Your patch looks correct and performs the copying
> > in the logically correct place, it would be nicer to keep this
> > crap limited to bridge netfilter however.
> > 
> > What should work is to perform the copying in br_netfilter.c
> > at the spots where phsyoutdev is assigned. As an optimization
> > we should be able to avoid the copying in most cases by
> > checking that the bridge info has a refcount above 1.
> > 
> > Could you test whether this patch also fixes the problem?
> 
> 
> That patch had a bug, we need to set the refcount of the
> new bridge info to 1 after performing the copy.
> 

This looks good, but you could use a structure assignment rather memcpy
(just a personal style preference because assignment is typed and memcpy
is not).

  reply	other threads:[~2008-01-16 18:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-9758-10286@http.bugzilla.kernel.org/>
2008-01-15 23:56 ` [Bugme-new] [Bug 9758] New: net_device refcnt bug when NFQUEUEing bridged packets Andrew Morton
2008-01-16  4:54   ` Patrick McHardy
2008-01-16  4:59     ` Patrick McHardy
2008-01-16 18:56       ` Stephen Hemminger [this message]
2008-01-20 13:58         ` Patrick McHardy

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=20080116105632.2532812c@speedy \
    --to=shemminger@linux-foundation.org \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.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).