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 6428D68 for ; Fri, 21 Aug 2015 15:07:23 +0000 (UTC) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4EB5DA7 for ; Fri, 21 Aug 2015 15:07:21 +0000 (UTC) Date: Fri, 21 Aug 2015 08:07:09 -0700 (PDT) From: Julia Lawall To: Dmitry Torokhov In-Reply-To: Message-ID: References: <2111196.TG1k3f53YQ@avalon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Tejun Heo , Shuah Khan , Russell King , ksummit-discuss@lists.linuxfoundation.org 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 Thu, 20 Aug 2015, Dmitry Torokhov wrote: > On Fri, Jul 31, 2015 at 8:14 AM, Laurent Pinchart > wrote: > > Hello, > > > > It recently came to my attention that the way devm_kzalloc() is used by most > > drivers is broken. I've raised the topic on LKML (see > > http://lkml.org/lkml/2015/7/14/741) in the hope that my findings were simply > > wrong, but it turned out I was unfortunately right. As the topic spans lots of > > subsystems I believe it would be a good technical topic for the Kernel Summit. > > > > Just realized another fun fact: most busses execute > dev_pm_domain_detach() in bus' remove() method, but devm-managed > resources (including interrupts and such) are only released in driver > core, which happens after bus' remove() method returns. So we may end > up shutting off PM domain of a device that is still active and may > generate interrupts, etc. Can the PM call be devmified too? What is there too the "etc"? Would it be better to just remove the devm functions related to interrupts? They seem to cause a lot of subtle problems. julia