[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0906291827050.21956@gentwo.org>
Date: Mon, 29 Jun 2009 18:30:12 -0400 (EDT)
From: Christoph Lameter <cl@...ux-foundation.org>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
penberg@...helsinki.fi, mpm@...enic.com, jdb@...x.dk
Subject: Re: [PATCH RFC] fix RCU-callback-after-kmem_cache_destroy problem
in sl[aou]b
On Thu, 25 Jun 2009, Paul E. McKenney wrote:
> Jesper noted that kmem_cache_destroy() invokes synchronize_rcu() rather
> than rcu_barrier() in the SLAB_DESTROY_BY_RCU case, which could result
> in RCU callbacks accessing a kmem_cache after it had been destroyed.
>
> The following untested (might not even compile) patch proposes a fix.
It could be seen to be the responsibility of the caller of
kmem_cache_destroy to insure that no accesses are pending.
If the caller specified destroy by rcu on cache creation then he also
needs to be aware of not destroying the cache itself until all rcu actions
are complete. This is similar to the caution that has to be execised then
accessing cache data itself.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists