All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: mirq-linux@rere.qmqm.pl
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH 2.6.20 07/10] nfnetlink_log: fix module	reference	counting
Date: Wed, 14 Feb 2007 18:22:12 +0100	[thread overview]
Message-ID: <45D34544.5090802@trash.net> (raw)
In-Reply-To: <20070214170721.GA3065@rere.qmqm.pl>

Micha³ Miros³aw wrote:
> On Wed, Feb 14, 2007 at 05:46:38PM +0100, Patrick McHardy wrote:
> 
>>Micha³ Miros³aw wrote:
>>
>>>On Tue, Feb 13, 2007 at 01:48:03PM +0100, Patrick McHardy wrote:
>>>
>>>>I think we should just cancel the timer on destruction.
>>>
>>>It won't solve a race between destroying the instance and logging a
>>>packet. It could happen that:
>>>[cut]
>>
>>This is easily fixable by adding a synchronize_rcu() call
>>after removing the instance from the global list.
>>nfulnl_log_packet() is called within a RCU read-side
>>critical section, so once synchronize_rcu() returns we're
>>guaranteed no CPU is within nfulnl_log_packet anymore with
>>this instance. And I think it is really preferable to having
>>the timer armed after destroying the instance.
> 
> 
> That looks better indeed. I'll start on reading what's RCU and
> how to use it properly. :)

Unfortunately the patch is still broken, we might hold
instances_lock and thus may not sleep (and especially
not call synchronize_rcu() since it will never return).
I'll look into this again, probably the conditional
locking should be removed as a first step.

      reply	other threads:[~2007-02-14 17:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12  0:39 [PATCH 2.6.20 07/10] nfnetlink_log: fix module reference counting Michał Mirosław
2007-02-13 12:48 ` Patrick McHardy
2007-02-13 16:25   ` Michał Mirosław
2007-02-14 16:46     ` Patrick McHardy
2007-02-14 17:07       ` Michał Mirosław
2007-02-14 17:22         ` Patrick McHardy [this message]

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=45D34544.5090802@trash.net \
    --to=kaber@trash.net \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.