netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jpirko@redhat.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: kaber@trash.net, netfilter@vger.kernel.org,
	bart.de.schuymer@pandora.be, davem@davemloft.net,
	shemminger@vyatta.com
Subject: Re: [Question] netfilter, xt_target->target and xt_target->checkentry locks
Date: Wed, 9 Jun 2010 15:00:46 +0200	[thread overview]
Message-ID: <20100609130045.GC2825@psychotron.lab.eng.brq.redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.01.1006091434130.22105@obet.zrqbmnf.qr>

Wed, Jun 09, 2010 at 02:37:51PM CEST, jengelh@medozas.de wrote:
>On Wednesday 2010-06-09 14:21, Jiri Pirko wrote:
>
>>Hi Patrick.
>>
>>Once module registers it's struct xt_target by xt_register_target and 
>>->target and ->checkentry funtions are called later, is there any lock 
>>guaranteed to be held?
>>From what I see for ->target it looks like rcu_read_lock is held, but 
>>I'm not sure for all paths. There would be nice to put a comment into 
>>struct xt_target definition regarding locks.
>
>Though nf_hook_slow invokes rcu_read_lock, that should not be a formal
>guarantee that Xtables extensions run with RCU. See xt_TCPMSS for 
>example.

A was afraid of it. Thanks.

>
>>Asking because I found several places where dev->br_port is
>>referenced directly (without rcu_dereference).
>

  reply	other threads:[~2010-06-09 13:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 12:21 [Question] netfilter, xt_target->target and xt_target->checkentry locks Jiri Pirko
2010-06-09 12:37 ` Jan Engelhardt
2010-06-09 13:00   ` Jiri Pirko [this message]
2010-06-09 13:03     ` Patrick McHardy
2010-06-09 13:13       ` Jiri Pirko
2010-06-09 13:26         ` Patrick McHardy
2010-06-09 14:06           ` Jiri Pirko

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=20100609130045.GC2825@psychotron.lab.eng.brq.redhat.com \
    --to=jpirko@redhat.com \
    --cc=bart.de.schuymer@pandora.be \
    --cc=davem@davemloft.net \
    --cc=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=netfilter@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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).