Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2797051imb; Mon, 4 Mar 2019 14:38:38 -0800 (PST) X-Google-Smtp-Source: APXvYqx8OZyp1b+3Z6jxx4vIc9UTJKMztP3XtylyrLT2N8NgvaIBDPv3coao/omkZ3B2hr1caitN X-Received: by 2002:a63:2d6:: with SMTP id 205mr20927062pgc.180.1551739118286; Mon, 04 Mar 2019 14:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551739118; cv=none; d=google.com; s=arc-20160816; b=SxcpbwmGwtQYuoVNJfnbuvy7cpYTp8Wr+91jmjSTpflZPG61jhiCOKTWqQlsA0GiHq VY2NriIlt2U5UzI3qSJN0oBrzvpaAe1yH94lWiIanh5Jo9b1lQ25Myvkko3O7FCXVr+k IJl3o3EyzOUT/6LvySkn51O5KuWRsP1VJd2FZYT7PZvS6Cl2geKi52q6paZNpwuMzToe +Sf3VRs47oI0DEiBA7Tp9iWF/P3Ip1j5ISjAMLRcDGtuvghXofpUjOl1wbAbqeitNCAS J+iPxl52oiWjWiGXATf2450qoAcG/Ckx0b/chVxGiTfnPc7Oe3LnA5bT8yRbtjozzwuM iI+A== 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=zhzJRAZt/R3PF5BQzh2oLYrOEtPSkbVjGUE3eqKeFF4=; b=byIEdqFTaqqVgdf33PjF7ddnw0QLsYx9GPCLe6u7UuCvIW4wnWMNu2sSdU3vW9wtL+ 5bOXMYWQ41QPzuKIKOAljpxOIE232o6PHiC4rQa6EOW/BY9mTehQOI56aqUFAW2SGKB9 psiybpFGndPPRR1FNvVEYWSKtAlxXNeGpT5+95qMLavdDW/21dDp2tYF0g/i0q0n+vWd lDQsWsnLnoG1VNnME6X2ZlOqvMN9aeOf9jtfVQ5590208a2CX4d6QkYudDtauVwz8ssX Qsn2ovT9tQWEGRvBZ55n4venlmXgPaj+OrPij6VSQSy/WeZ9TXKvxNbvun8G8OGVwOkv ai1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="i/pqUSxt"; 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 cn7si6968516plb.194.2019.03.04.14.38.23; Mon, 04 Mar 2019 14:38:38 -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="i/pqUSxt"; 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 S1726409AbfCDWiD (ORCPT + 99 others); Mon, 4 Mar 2019 17:38:03 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:40745 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbfCDWiC (ORCPT ); Mon, 4 Mar 2019 17:38:02 -0500 Received: by mail-lf1-f65.google.com with SMTP id a8so4708703lfi.7 for ; Mon, 04 Mar 2019 14:38:01 -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=zhzJRAZt/R3PF5BQzh2oLYrOEtPSkbVjGUE3eqKeFF4=; b=i/pqUSxtkZTGQee4dyx8hrGiQrrcDTKPONLULgYNsJ2AzkjzVjfdBDhjIHInC62gfg DW7IvlZrIxjqbN9ivBT61CTVwE573URms1XXpmpJ7tYce4+jTWlWb4qa2mc3dYtL3Sph o+lAcxX96jnbMrttUrBFJYkjh+JNAN+544IGWLhJv1I7Qg0ngpndI8XHvACB8hQhOupT F9+mOnmrz+zeaYhxzXiPA+ZQCbto65SSHf8/44JSbxuiSZoWYqv75JgCZfIvSVewPfEL zWAs2f6+ED3qgR1osxaG9eDYNs2+HnLB13VTPjz6tqNrnxETFtreoYDQ513hqrG/8kw9 1ITg== 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=zhzJRAZt/R3PF5BQzh2oLYrOEtPSkbVjGUE3eqKeFF4=; b=IT9tEqRGYjY7yXG5kx9HEp6TUrOLPKybz5e5cGq6TaEUsbIgmVGIdt/hTiuxEuBoyf U/sDGBwyTYCTiqWIJDfC4V1cjxt+jdKkPQ3OHnfjwPIQQKTiG5qYvAx2bl5oug5LF8D5 O7PzLwKN2UQnwdUC8Bvl2+1GKIZx71f7T3cPmAEMgtPo1eFRK54aah1cGzSCqaPboIE+ MgguZchf5+Yd45MoYRaysQ5udSM/RRt2v2Tnrz7CoNvH5K6RZiwOHlolaMLsvZO1V3nI 5bsnQHPcg9SkMKauffuOuu4pq1tah6qW0Tr8qO6aJH5P48+todDzJbjcmuymCs4ttdcv vU5w== X-Gm-Message-State: APjAAAVPodHx/sowxUQtDlzC7ygOodZ5iR1MNR6O+R2WtNldthaXPfW5 lJoGndfTPuPuArogT8vJksaVUSRoC6+TnR/ucjCKuA== X-Received: by 2002:a19:a417:: with SMTP id q23mr7220186lfc.27.1551739080195; Mon, 04 Mar 2019 14:38:00 -0800 (PST) MIME-Version: 1.0 References: <1551430616-42014-1-git-send-email-wen.yang99@zte.com.cn> <20190301155523.GA1915@Mani-XPS-13-9360> <20190304144829.GA5265@Mani-XPS-13-9360> In-Reply-To: <20190304144829.GA5265@Mani-XPS-13-9360> From: Linus Walleij Date: Mon, 4 Mar 2019 23:37:48 +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 Mon, Mar 4, 2019 at 3:48 PM Manivannan Sadhasivam wrote: > On Mon, Mar 04, 2019 at 01:29:33PM +0100, Linus Walleij wrote: > > 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. > > > > Oops. I think I missed that! Can you please point me to that patch? And how it > got merged? I did the PR for actions stuff this time and haven't included any > mach-actions patches. I just did git log arch/arm/mach-actions but I think it came in quite some time ago, not last merge window: But you see: commit 6c2eb3e76fb84e2eb46d484f71fab469c0d9532c "ARM: owl: smp: Drop owl_secondary_boot()" commit bad29933fef76fb6ee577f4a0b6d145c1f52f663 "ARM: owl: smp: Use __pa_symbol()" commit 18cfd9429d8a82c49add8f3ca9d366599bfcac45 "ARM: owl: smp: Drop bogus holding pen" platsmp.c looks just fine these days. Except for what Wei's patch is fixing, of_node_put(). Yours, Linus Walleij