From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbbGOP5u (ORCPT ); Wed, 15 Jul 2015 11:57:50 -0400 Received: from lists.s-osg.org ([54.187.51.154]:52966 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751830AbbGOP5D (ORCPT ); Wed, 15 Jul 2015 11:57:03 -0400 Subject: Re: [PATCH] regulator: core: Fix memory leak in regulator_resolve_supply() To: Mark Brown References: <1436883709-9337-1-git-send-email-javier@osg.samsung.com> <55A61C0E.4040707@osg.samsung.com> <20150715112730.GN11162@sirena.org.uk> <55A65621.4080109@osg.samsung.com> <20150715155254.GR11162@sirena.org.uk> Cc: Krzysztof Kozlowski , Liam Girdwood , linux-kernel@vger.kernel.org From: Javier Martinez Canillas Message-ID: <55A682C9.7040906@osg.samsung.com> Date: Wed, 15 Jul 2015 17:56:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <20150715155254.GR11162@sirena.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mark, On 07/15/2015 05:52 PM, Mark Brown wrote: > On Wed, Jul 15, 2015 at 02:46:25PM +0200, Javier Martinez Canillas wrote: >> On 07/15/2015 01:27 PM, Mark Brown wrote: > >>> using _regulator_get() I think. A separate, rarely used, path is likely >>> to have this sort of issue. > >> Exactly, do you agree then that a try_module_get() is missing in set_supply()? > >> It is OK if I add that in the same patch in v2 or do you prefer that to be >> in a separate patch? > > A separate patch would be better, or even better would be something that > just replaces everything there with use of the same code path as _get() > (thanks for volunteering!) but just adding the try_module_get() is fine > for now. > I already posted a v2 of the series which adds a try_module_get() as a separate patch but I'll add to my TODO list at factoring out both code paths as a follow-up. Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America