From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AD08C4332F for ; Wed, 28 Dec 2022 09:51:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229864AbiL1JvZ (ORCPT ); Wed, 28 Dec 2022 04:51:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbiL1Juh (ORCPT ); Wed, 28 Dec 2022 04:50:37 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8AF510075; Wed, 28 Dec 2022 01:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672221036; x=1703757036; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=jcHRyTOIWLvjQ22vBtCT8JpVqWGWk/i6Ux7FH4hlVT8=; b=I4VJWIhIz73moz63vBg/B00NjrFi9aGo/jdNvDflnIJKLz0BbDXzLXvt VElGmlT35eabB9JxqSFrcqKt+SoV/xMjJ8g/9KNEvnEmSaglJS/TZ/dfm trH9qogjZ478HnbAh4NHOx2Ouh53urfN+iQeewYY4gFwDqyBqdEosbVQc sw4cMKnjoCtD+2Kmh6NczW9PVKThW48pywynWjvvIApsTlvApZKekNksK n2bZsYaZgzUySNxdppOGJk0CeAJ4eCMSNziTOvpjGK0PgciRi4edJCB4A yf/LL+dpGjElTJvGvY0zmIR0GR8P/LPssYKY9fJ8zV/XkjdW5k4xjYZlO A==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="385266942" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="385266942" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2022 01:50:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="655265447" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="655265447" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP; 28 Dec 2022 01:50:33 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pAT4y-000WIj-00; Wed, 28 Dec 2022 11:50:32 +0200 Date: Wed, 28 Dec 2022 11:50:31 +0200 From: Andy Shevchenko To: Greg KH Cc: Yang Yingliang , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, djrscally@gmail.com, heikki.krogerus@linux.intel.com, sakari.ailus@linux.intel.com, rafael@kernel.org Subject: Re: [PATCH v3] device property: fix of node refcount leak in fwnode_graph_get_next_endpoint() Message-ID: References: <20221123022542.2999510-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, Dec 28, 2022 at 10:46:12AM +0100, Greg KH wrote: > On Wed, Dec 28, 2022 at 11:37:15AM +0200, Andy Shevchenko wrote: > > On Wed, Nov 23, 2022 at 10:25:42AM +0800, Yang Yingliang wrote: > > > The 'parent' returned by fwnode_graph_get_port_parent() > > > with refcount incremented when 'prev' is not NULL, it > > > needs be put when finish using it. > > > > > > Because the parent is const, introduce a new variable to > > > store the returned fwnode, then put it before returning > > > from fwnode_graph_get_next_endpoint(). > > > > Rafael, Greg, is this went through the cracks? > > Yes, but still in my queue. I'll look at it when I get back from break. Have a nice one! -- With Best Regards, Andy Shevchenko