Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2424839imb; Mon, 4 Mar 2019 05:00:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwkAmzSzHt3ZqJSQE6j3BGgEZRe6cpfChSYehhEWEdvauREE3geJO8ZkLquah2FWLPzL35a X-Received: by 2002:a63:3648:: with SMTP id d69mr18494575pga.314.1551704451201; Mon, 04 Mar 2019 05:00:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551704451; cv=none; d=google.com; s=arc-20160816; b=jWyoBpSR8/q189/S1EqnviSsrxwwh7Wr72hc5OqtyzwLe9cXH1DFvnxhdw/o9pMhfU oKfQxhfd6ZAvNOPnYxXyfDWkvZAY8hoCODZ7K/V5qWX7Aw3o1LyTsmyA6XI/IokHhZLt aoUdKFdAMhEZoZTdX/H6crEt61IxpTSQ/N/PWGtJWm2mTmDn+lo5KdTdSTZurnXq+qhM UkWGbIAM7kNFw5j9emoD8lzDzrHwLZysxYtsl7x5xpqOQO3n3mxqColJ8GPOzeUgZHn7 P4UVU7QfANJJ5ldHQFr3NmPhTx/6fQHnWkaxlEvns6LFmyw0JFkSRonFmPJ7yghYWgJt VhYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fgxOZP+dFQBUPmSEDR9WfH52m7XyQaNgMzlC/Q0birs=; b=DjqvgiE2jQWN83UP4z+/U/eRk0LTXHBavxaPK+jp6CNdHRV7mxjOXRDTbsN+UJmx21 2SbBnjY7R4rixY2EczlMLd1MseQDmAu0erIvpf7OWKvgNFJBsg5iuMXhsA0e/Zk4otlK l7v5XZcCoWboBPgmeGXJPgd5ajgUF7XumSd/VHIstmkvGM08zUq5vIIN5HiW4USPgeD6 78CYxLgcEPNHVfGH07CKom8JPLy0gvQr22KpJ/40NAeqSWLUQCFHoZNIFg6M2U7+6fG8 s0H0A1brNGM3h64VznUXPlqjv8a9oyI6Hkb1/TS19HM6SaPy/y8ObPi7/VL+pM1GBCP3 nGaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZu9tlVv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cn17si5848076plb.139.2019.03.04.05.00.36; Mon, 04 Mar 2019 05:00:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZu9tlVv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726214AbfCDM3r (ORCPT + 99 others); Mon, 4 Mar 2019 07:29:47 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:36835 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfCDM3r (ORCPT ); Mon, 4 Mar 2019 07:29:47 -0500 Received: by mail-lj1-f195.google.com with SMTP id v10so4159953lji.3 for ; Mon, 04 Mar 2019 04:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fgxOZP+dFQBUPmSEDR9WfH52m7XyQaNgMzlC/Q0birs=; b=hZu9tlVv49i8EUfictk3sxX9NSdfhxtF6JwpGqTjGVCtqDrBsnLl3ParhWyXQzWgg8 8LwN9FvowN3pgbMWVla1VDGTGvtb7Pal8paz4s0+1Yt8gP3jkYfJx24Pk0847kC2kOcY OKi5N6vLYqMdXXfd/euYJJjBuLw3OymL0hvvLa8isn9xyILlCIhef8rJ6zoFDEgbCm5W Dj3XpBaakqkvkQQXl3y0to7P1YHLA44pEq1TPQFc6y+Hta6oDaNha7PWGSYVlyqkpmh+ J54b471LNq8ZwKYehc4//UffGvfVZFw8IEMo4GW+Cy/yoNVlgrvm0+cjKtynfQ+ig0+S rkdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fgxOZP+dFQBUPmSEDR9WfH52m7XyQaNgMzlC/Q0birs=; b=L4M9IPOhPVgLogqwCWpmxBZ8/j2LKZvZO5GBtFFCSGReN7dJf/s+cmFymqukADSUif fsNqZogMT9+DsaBqocTbOPSF+cz26CwZFIZc0oDr7yCYSMgBYuofcqRMdzj3iF7IICEw kvlSE2KKfKYDXXGhOkK+HhAzI/TjQBEn8Suq2IvXRL9GjFi3j8PSp9ijbYuE724en2sj C0ODcbNVLacSW5aUhDAvpQvOvfxHVwCPhaAJ4n3WVa0P+uI1IKEuXggJDfCYWQrSQdh3 DCWkXLSK+kJhpiRA9iLP/t3P+V2WKC1m+HwHu5UmAAkPQYFzEQYWEl7NyRfjFRUWhLPt WsUQ== X-Gm-Message-State: APjAAAUymbpKBpRkvsayJlrbmh9g08r3l5RHRnjhvF3d3VUbW51aDBTH P2eWrXIu9fq+56yuHSiKQrf4smT0B2HbNDvgU55oSA== X-Received: by 2002:a2e:9217:: with SMTP id k23mr512827ljg.159.1551702585121; Mon, 04 Mar 2019 04:29:45 -0800 (PST) MIME-Version: 1.0 References: <1551430616-42014-1-git-send-email-wen.yang99@zte.com.cn> <20190301155523.GA1915@Mani-XPS-13-9360> In-Reply-To: <20190301155523.GA1915@Mani-XPS-13-9360> From: Linus Walleij Date: Mon, 4 Mar 2019 13:29:33 +0100 Message-ID: Subject: Re: [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put To: Manivannan Sadhasivam Cc: Wen Yang , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Russell King , Linux ARM , "linux-kernel@vger.kernel.org" , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc , Michal Simek , Dinh Nguyen , =?UTF-8?Q?Heiko_St=C3=BCbner?= , "open list:ARM/Rockchip SoC..." , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list , avifishman70@gmail.com, Tomer Maimon , Patrick Venture , Nancy Yuen , Brendan Higgins , OpenBMC Maillist , Xu Wei , Maxime Ripard , Chen-Yu Tsai , Catalin Marinas , Will Deacon , Simon Horman , Magnus Damm , Linux-Renesas , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , NXP Linux Team , wang.yi59@zte.com.cn Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 1, 2019 at 4:55 PM Manivannan Sadhasivam wrote: > Hi Wen, > > On Fri, Mar 01, 2019 at 04:56:42PM +0800, Wen Yang wrote: > > The call to of_get_next_child returns a node pointer with refcount > > incremented thus it must be explicitly decremented after the last > > usage. > > > > Detected by coccinelle with the following warnings: > > ./arch/arm/mach-actions/platsmp.c:112:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 103, but without a corresponding object release within this function. > > ./arch/arm/mach-actions/platsmp.c:124:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 115, but without a corresponding object release within this function. > > ./arch/arm/mach-actions/platsmp.c:137:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 128, but without a corresponding object release within this function. > > > > We have a floating patch for this: > https://www.spinics.net/lists/arm-kernel/msg694544.html > > Andreas: Can you please take a second look at the patchset submitted by Linus > Walleij and Russel for simplifying the Actions startup code? Andreas wrote a version of simplifying secondary startup in the same spirit as Russell's patches, and it's merged and all is fine I think. If this patch applied on top of the current upstream code I'd say just forget about my patch and merge Wen's patch instead. Yours, Linus Walleij