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 9A1468D7 for ; Fri, 21 Aug 2015 02:19:52 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 147861D9 for ; Fri, 21 Aug 2015 02:19:52 +0000 (UTC) Received: by oio137 with SMTP id 137so34374123oio.0 for ; Thu, 20 Aug 2015 19:19:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <2111196.TG1k3f53YQ@avalon> References: <2111196.TG1k3f53YQ@avalon> Date: Thu, 20 Aug 2015 19:19:51 -0700 Message-ID: From: Dmitry Torokhov To: Laurent Pinchart Content-Type: text/plain; charset=UTF-8 Cc: Shuah Khan , Russell King , ksummit-discuss@lists.linuxfoundation.org, Tejun Heo 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 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. Fun, huh? Thanks. -- Dmitry