[lkml]   [2009]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.

 \ /
  Last update: 2009-06-30 00:33    [W:0.045 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site