From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) by kanga.kvack.org (Postfix) with ESMTP id A12216B0038 for ; Wed, 9 Sep 2015 19:31:04 -0400 (EDT) Received: by qkap81 with SMTP id p81so11782288qka.2 for ; Wed, 09 Sep 2015 16:31:04 -0700 (PDT) Received: from resqmta-ch2-02v.sys.comcast.net (resqmta-ch2-02v.sys.comcast.net. [2001:558:fe21:29:69:252:207:34]) by mx.google.com with ESMTPS id a51si10626366qge.64.2015.09.09.16.31.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 09 Sep 2015 16:31:04 -0700 (PDT) Date: Wed, 9 Sep 2015 18:31:02 -0500 (CDT) From: Christoph Lameter Subject: Re: Is it OK to pass non-acquired objects to kfree? In-Reply-To: <20150909203642.GO4029@linux.vnet.ibm.com> Message-ID: References: <20150909184415.GJ4029@linux.vnet.ibm.com> <20150909203642.GO4029@linux.vnet.ibm.com> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: "Paul E. McKenney" Cc: Dmitry Vyukov , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "linux-mm@kvack.org" , Andrey Konovalov , Alexander Potapenko On Wed, 9 Sep 2015, Paul E. McKenney wrote: > Either way, Dmitry's tool got a hit on real code using the slab > allocators. If that hit is a false positive, then clearly Dmitry > needs to fix his tool, however, I am not (yet) convinced that it is a > false positive. If it is not a false positive, we might well need to > articulate the rules for use of the slab allocators. Could I get a clear definiton as to what exactly is positive? Was this using SLAB, SLUB or SLOB? > > This would all use per cpu data. As soon as a handoff is required within > > the allocators locks are being used. So I would say no. > > As in "no, it is not necessary for the caller of kfree() to invoke barrier() > in this example", right? Actually SLUB contains a barrier already in kfree(). Has to be there because of the way the per cpu pointer is being handled. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org