From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by kanga.kvack.org (Postfix) with ESMTP id 1FB226B0038 for ; Thu, 10 Sep 2015 14:13:20 -0400 (EDT) Received: by igcpb10 with SMTP id pb10so26693587igc.1 for ; Thu, 10 Sep 2015 11:13:20 -0700 (PDT) Received: from resqmta-ch2-04v.sys.comcast.net (resqmta-ch2-04v.sys.comcast.net. [2001:558:fe21:29:69:252:207:36]) by mx.google.com with ESMTPS id no4si7270964igb.49.2015.09.10.11.13.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 10 Sep 2015 11:13:19 -0700 (PDT) Date: Thu, 10 Sep 2015 13:13:18 -0500 (CDT) From: Christoph Lameter Subject: Re: Is it OK to pass non-acquired objects to kfree? In-Reply-To: Message-ID: References: <20150909184415.GJ4029@linux.vnet.ibm.com> <20150909203642.GO4029@linux.vnet.ibm.com> <20150910171333.GD4029@linux.vnet.ibm.com> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Dmitry Vyukov Cc: "Paul E. McKenney" , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "linux-mm@kvack.org" , Andrey Konovalov , Alexander Potapenko On Thu, 10 Sep 2015, Dmitry Vyukov wrote: > On Thu, Sep 10, 2015 at 8:01 PM, Christoph Lameter wrote: > > On Thu, 10 Sep 2015, Paul E. McKenney wrote: > > > >> The reason we poked at this was to see if any of SLxB touched the > >> memory being freed. If none of them touched the memory being freed, > >> and if that was a policy, then the idiom above would be legal. However, > >> one of them does touch the memory being freed, so, yes, the above code > >> needs to be fixed. > > > > The one that touches the object has a barrier() before it touches the > > memory. > > It does not change anything, right? It changes the first word of the object after the barrier. The first word is used in SLUB as the pointer to the next free object. -- 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