From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f44.google.com (mail-qg0-f44.google.com [209.85.192.44]) by kanga.kvack.org (Postfix) with ESMTP id 5C1786B0038 for ; Thu, 10 Sep 2015 14:01:45 -0400 (EDT) Received: by qgez77 with SMTP id z77so42485732qge.1 for ; Thu, 10 Sep 2015 11:01:45 -0700 (PDT) Received: from resqmta-ch2-12v.sys.comcast.net (resqmta-ch2-12v.sys.comcast.net. [2001:558:fe21:29:69:252:207:44]) by mx.google.com with ESMTPS id q124si14246762qha.116.2015.09.10.11.01.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 10 Sep 2015 11:01:44 -0700 (PDT) Date: Thu, 10 Sep 2015 13:01:42 -0500 (CDT) From: Christoph Lameter Subject: Re: Is it OK to pass non-acquired objects to kfree? In-Reply-To: <20150910171333.GD4029@linux.vnet.ibm.com> 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: "Paul E. McKenney" Cc: Dmitry Vyukov , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "linux-mm@kvack.org" , Andrey Konovalov , Alexander Potapenko 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. -- 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