netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: paulmck@linux.vnet.ibm.com
Cc: Chuck Ebbert <cebbert@redhat.com>, Krzysztof Oledzki <ole@ans.pl>,
	Netdev <netdev@vger.kernel.org>,
	Netfilter Development Mailinglist
	<netfilter-devel@vger.kernel.org>
Subject: Re: Oops in nf_nat_core.c:find_appropriate_src(), kernel 2.6.25.4
Date: Thu, 12 Jun 2008 12:41:12 +0200	[thread overview]
Message-ID: <4850FD48.8050309@trash.net> (raw)
In-Reply-To: <20080611154520.GA9384@linux.vnet.ibm.com>

Paul E. McKenney wrote:
> On Tue, Jun 10, 2008 at 11:02:59AM +0200, Patrick McHardy wrote:
>> Possibly fixes https://bugzilla.redhat.com/show_bug.cgi?id=449315
>> and/or http://bugzilla.kernel.org/show_bug.cgi?id=10875
> 
> One question and one nit below.
> 
>> @@ -570,8 +569,8 @@ static void nf_nat_move_storage(void *new, void *old)
>>  		return;
>>
>>  	spin_lock_bh(&nf_nat_lock);
>> -	hlist_replace_rcu(&old_nat->bysource, &new_nat->bysource);
>>  	new_nat->ct = ct;
>> +	hlist_replace_rcu(&old_nat->bysource, &new_nat->bysource);
> 
> The intent is to ensure that new_nat->ct is initialized before any
> readers can find new_nat, right?  If so, OK.

Correct. Its relying on the smb_wmb() in hlist_replace_rcu(),
but that seems OK.

>> diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
>> index bcc19fa..8a3f8b3 100644
>> --- a/net/netfilter/nf_conntrack_extend.c
>> +++ b/net/netfilter/nf_conntrack_extend.c
>> @@ -59,12 +59,19 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
>>  	if (!*ext)
>>  		return NULL;
>>
>> +	INIT_RCU_HEAD(&(*ext)->rcu);
> 
> Nit: the above is unnecessary.

I think its good style to use explicit initializers without
making assumptions about what exactly they do.

Thanks for the review.


  reply	other threads:[~2008-06-12 10:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-07 14:43 Oops in nf_nat_core.c:find_appropriate_src(), kernel 2.6.25.4 Chuck Ebbert
2008-06-07 15:00 ` Patrick McHardy
2008-06-07 15:14   ` Patrick McHardy
2008-06-07 15:45     ` Krzysztof Oledzki
2008-06-10  9:02       ` Patrick McHardy
2008-06-10 13:56         ` Krzysztof Oledzki
2008-06-10 14:00           ` Patrick McHardy
2008-06-10 17:07             ` Krzysztof Oledzki
2008-06-11 15:45         ` Paul E. McKenney
2008-06-12 10:41           ` Patrick McHardy [this message]
2008-06-17 13:44         ` 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=4850FD48.8050309@trash.net \
    --to=kaber@trash.net \
    --cc=cebbert@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=ole@ans.pl \
    --cc=paulmck@linux.vnet.ibm.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).