From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AC63C409 for ; Sat, 1 Aug 2015 11:03:44 +0000 (UTC) Received: from galahad.ideasonboard.com (galahad.ideasonboard.com [185.26.127.97]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 57C13184 for ; Sat, 1 Aug 2015 11:03:44 +0000 (UTC) From: Laurent Pinchart To: Christoph Hellwig Date: Sat, 01 Aug 2015 14:04:24 +0300 Message-ID: <1624703.qdGzscHWSc@avalon> In-Reply-To: <20150731165346.GA18984@infradead.org> References: <2111196.TG1k3f53YQ@avalon> <20150731165346.GA18984@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: Tejun Heo , Russell King , ksummit-discuss@lists.linuxfoundation.org, Shuah Khan Subject: Re: [Ksummit-discuss] [TECH TOPIC] Fix devm_kzalloc, its users, or both List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 31 July 2015 09:53:46 Christoph Hellwig wrote: > On Fri, Jul 31, 2015 at 06:34:21PM +0200, Julia Lawall wrote: > > How is this different from the free happening explicitly in the remove > > function? > > It's not. The real problem is that people don't understand life time > rules and expect magic interfaces to fix it for them. Exactly. I see two solutions for that, either making people understand life time rules, or creating interfaces that really fix it for them. devm_kzalloc() isn't such an interface (and I'm fine if we believe it shouldn't be), but it unfortunately gives driver developers the impression that it is supposed to fix the problem. If we conclude that the problem is between the chair and the keyboard of driver developers then we'll need to start being more vocal about it. -- Regards, Laurent Pinchart