[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0909041130030.9781@V090114053VZO-1>
Date: Fri, 4 Sep 2009 11:33:26 -0400 (EDT)
From: Christoph Lameter <cl@...ux-foundation.org>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
cc: Eric Dumazet <eric.dumazet@...il.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Zdenek Kabelac <zdenek.kabelac@...il.com>,
Patrick McHardy <kaber@...sh.net>, Robin Holt <holt@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jesper Dangaard Brouer <hawk@...x.dk>,
Linux Netdev List <netdev@...r.kernel.org>,
Netfilter Developers <netfilter-devel@...r.kernel.org>
Subject: Re: [PATCH] slub: fix slab_pad_check()
On Thu, 3 Sep 2009, Paul E. McKenney wrote:
> > You need to ensure that no objects are in use before destroying a slab. In
> > case of DESTROY_BY_RCU you must ensure that there are no potential
> > readers. So use a suitable rcu barrier or something else like a
> > synchronize_rcu...
>
> If by "you must ensure" you mean "kmem_cache_destroy must ensure", then
> we are in complete agreement. Otherwise, not a chance.
Well then we are going down to a crappy interface and mixing rcu with slab
semantics. More bugs to follow in the future.
> If by "must ensure that no objects are in use", you mean "must have
> no further references to them", then we are in agreement. And in my
> scenario above, it is not the -user- who later references the memory,
> but rather the slab code itself.
The slab code itself is not referencing the later memory with my patch. It
can only be the user.
> Put the rcu_barrier() in kmem_cache_free(). Please.
Guess we are doing this ... Sigh. Are you going to add support other rcu
versions to slab as well as time permits and as the need arises? Should we
add you as a maintainer? ;-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists