Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933898AbZIDTZr (ORCPT ); Fri, 4 Sep 2009 15:25:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757219AbZIDTZq (ORCPT ); Fri, 4 Sep 2009 15:25:46 -0400 Received: from smtp2.ultrahosting.com ([74.213.174.253]:36057 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757165AbZIDTZp (ORCPT ); Fri, 4 Sep 2009 15:25:45 -0400 Date: Fri, 4 Sep 2009 11:42:17 -0400 (EDT) From: Christoph Lameter X-X-Sender: cl@V090114053VZO-1 To: "Paul E. McKenney" cc: Eric Dumazet , Pekka Enberg , Zdenek Kabelac , Patrick McHardy , Robin Holt , Linux Kernel Mailing List , Jesper Dangaard Brouer , Linux Netdev List , Netfilter Developers Subject: Re: [PATCH] slub: fix slab_pad_check() In-Reply-To: <20090903231757.GP6761@linux.vnet.ibm.com> Message-ID: References: <4A9F1620.2080105@gmail.com> <84144f020909022331x2b275aa5n428f88670e0ae8bc@mail.gmail.com> <4A9F7283.1090306@gmail.com> <4A9FCDC6.3060003@gmail.com> <4A9FDA72.8060001@gmail.com> <4AA00400.1030005@gmail.com> <20090903231757.GP6761@linux.vnet.ibm.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1075 Lines: 23 On Thu, 3 Sep 2009, Paul E. McKenney wrote: > If it were the user of the slab who was invoking some variant of > call_rcu(), then I would agree with you. The user already has to deal with it as explained by Eric. > However, call_rcu() is instead being invoked by the slab itself in the > case of SLAB_DESTROY_BY_RCU, so that there is no variation in usage. > Requiring that the user call rcu_barrier() is asking for subtle bugs. > Therefore, the best approach is to have kmem_cache_destroy() handle > the RCU cleanup, given that this cleanup is for actions taken by > kmem_cache_free(), not by the user. The user already has to properly handle barriers and rcu logic in order to use objects handled with RCU properly. Moreover the user even has to check that the object is not suddenly checked under it. Its already complex. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/