[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Mar 2011 15:33:31 +0800
From: Changli Gao <xiaosuo@...il.com>
To: "Oleg A. Arkhangelsky" <sysoleg@...dex.ru>
Cc: Patrick McHardy <kaber@...sh.net>, netfilter-devel@...r.kernel.org,
netdev@...r.kernel.org,
Paul E McKenney <paulmck@...ux.vnet.ibm.com>
Subject: Re: Kernel panic nf_nat_setup_info+0x5b3/0x6e0
On Thu, Mar 3, 2011 at 3:50 AM, "Oleg A. Arkhangelsky"
<sysoleg@...dex.ru> wrote:
> 02.03.2011, 17:37, "Changli Gao" <xiaosuo@...il.com>:
>
>> t should be NULL here, as offsetof(struct nf_conn, dst.protonum) == 0x36.
>> We should free the nf_ct_extend with call_rcu(), since nat ext is
>> referenced in the rcu read context.
>
> Yes, I think the problem is triggered when nf_conntrack_free() is called by
> different CPU during net->ipv4.nat_bysource hash traversal. Extensions
> framework doesn't have any SLAB_DESTROY_BY_RCU magic.
>
> I'm not sure, but couldn't this problem be introduced by:
>
> ea781f197d6a835cbb93a0bf88ee1696296ed8aa
> netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()
>
> ?
>
There is nothing to do with SLAB_DESTROY_BY_RCU. Here is the comment
for this flag:
/*
* SLAB_DESTROY_BY_RCU - **WARNING** READ THIS!
*
* This delays freeing the SLAB page by a grace period, it does _NOT_
* delay object freeing. This means that if you do kmem_cache_free()
* that memory location is free to be reused at any time. Thus it may
* be possible to see another object there in the same RCU grace period.
*
* This feature only ensures the memory location backing the object
* stays valid, the trick to using this is relying on an independent
* object validation pass. Something like:
...
Please try the patch attached and test if the problem is solved or not. Thanks.
--
Regards,
Changli Gao(xiaosuo@...il.com)
View attachment "nf_ext_rcu.diff" of type "text/plain" (1384 bytes)
Powered by blists - more mailing lists