linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put
@ 2019-03-01  8:56 Wen Yang
  2019-03-01  8:56 ` [PATCH 02/15] ARM: bcm: " Wen Yang
                   ` (14 more replies)
  0 siblings, 15 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: "Andreas Färber" <afaerber@suse.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-actions/platsmp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c
index 4fd479c..1a8e078 100644
--- a/arch/arm/mach-actions/platsmp.c
+++ b/arch/arm/mach-actions/platsmp.c
@@ -107,6 +107,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
 	}
 
 	timer_base_addr = of_iomap(node, 0);
+	of_node_put(node);
 	if (!timer_base_addr) {
 		pr_err("%s: could not map timer registers\n", __func__);
 		return;
@@ -119,6 +120,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
 	}
 
 	sps_base_addr = of_iomap(node, 0);
+	of_node_put(node);
 	if (!sps_base_addr) {
 		pr_err("%s: could not map sps registers\n", __func__);
 		return;
@@ -132,6 +134,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
 		}
 
 		scu_base_addr = of_iomap(node, 0);
+		of_node_put(node);
 		if (!scu_base_addr) {
 			pr_err("%s: could not map scu registers\n", __func__);
 			return;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 02/15] ARM: bcm: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01 18:28   ` Florian Fainelli
  2019-03-01  8:56 ` [PATCH 03/15] ARM: exynos: " Wen Yang
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-bcm/board_bcm281xx.c:43:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 35, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-bcm/board_bcm281xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c
index b81bb38..1238ac8 100644
--- a/arch/arm/mach-bcm/board_bcm281xx.c
+++ b/arch/arm/mach-bcm/board_bcm281xx.c
@@ -38,6 +38,7 @@ static void bcm281xx_restart(enum reboot_mode mode, const char *cmd)
 		return;
 	}
 	base = of_iomap(np_wdog, 0);
+	of_node_put(np_wdog);
 	if (!base) {
 		pr_emerg("Couldn't map brcm,kona-wdt\n");
 		return;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 03/15] ARM: exynos: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
  2019-03-01  8:56 ` [PATCH 02/15] ARM: bcm: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  9:14   ` Krzysztof Kozlowski
  2019-03-01  8:56 ` [PATCH 04/15] ARM: hisi: " Wen Yang
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-exynos/firmware.c:201:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 193, but without a corresponding object release within this function.
./arch/arm/mach-exynos/firmware.c:204:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 193, but without a corresponding object release within this function.
./arch/arm/mach-exynos/suspend.c:642:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 634, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-exynos/firmware.c | 1 +
 arch/arm/mach-exynos/suspend.c  | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index d602e3b..2eaf2db 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -196,6 +196,7 @@ bool __init exynos_secure_firmware_available(void)
 		return false;
 
 	addr = of_get_address(nd, 0, NULL, NULL);
+	of_node_put(nd);
 	if (!addr) {
 		pr_err("%s: No address specified.\n", __func__);
 		return false;
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index 0850505..9afb0c6 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -639,8 +639,10 @@ void __init exynos_pm_init(void)
 
 	if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
 		pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
+		of_node_put(np);
 		return;
 	}
+	of_node_put(np);
 
 	pm_data = (const struct exynos_pm_data *) match->data;
 
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 04/15] ARM: hisi: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
  2019-03-01  8:56 ` [PATCH 02/15] ARM: bcm: " Wen Yang
  2019-03-01  8:56 ` [PATCH 03/15] ARM: exynos: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  8:56 ` [PATCH 05/15] ARM: imx51: " Wen Yang
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-hisi/platsmp.c:74:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
./arch/arm/mach-hisi/platsmp.c:78:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
./arch/arm/mach-hisi/platmcpm.c:337:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 275, but without a corresponding object release within this function.
./arch/arm/mach-hisi/platmcpm.c:347:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 275, but without a corresponding object release within this function.
./arch/arm/mach-hisi/platmcpm.c:337:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 284, but without a corresponding object release within this function.
./arch/arm/mach-hisi/platmcpm.c:347:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 284, but without a corresponding object release within this function.
./arch/arm/mach-hisi/platmcpm.c:337:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 287, but without a corresponding object release within this function.
./arch/arm/mach-hisi/platmcpm.c:347:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 287, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-hisi/platmcpm.c | 12 ++++++++++--
 arch/arm/mach-hisi/platsmp.c  |  7 +++++--
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c
index f66815c..695423c 100644
--- a/arch/arm/mach-hisi/platmcpm.c
+++ b/arch/arm/mach-hisi/platmcpm.c
@@ -277,6 +277,7 @@ static int __init hip04_smp_init(void)
 		goto err;
 	ret = of_property_read_u32_array(np, "boot-method",
 					 &hip04_boot_method[0], 4);
+	of_node_put(np);
 	if (ret)
 		goto err;
 
@@ -285,12 +286,14 @@ static int __init hip04_smp_init(void)
 	if (!np_sctl)
 		goto err;
 	np_fab = of_find_compatible_node(NULL, NULL, "hisilicon,hip04-fabric");
-	if (!np_fab)
+	if (!np_fab) {
+		of_node_put(np_sctl);
 		goto err;
+	}
 
 	ret = memblock_reserve(hip04_boot_method[0], hip04_boot_method[1]);
 	if (ret)
-		goto err;
+		goto err_put_node;
 
 	relocation = ioremap(hip04_boot_method[2], hip04_boot_method[3]);
 	if (!relocation) {
@@ -334,6 +337,8 @@ static int __init hip04_smp_init(void)
 	iounmap(relocation);
 
 	smp_set_ops(&hip04_smp_ops);
+	of_node_put(np_fab);
+	of_node_put(np_sctl);
 	return ret;
 err_table:
 	iounmap(fabric);
@@ -343,6 +348,9 @@ static int __init hip04_smp_init(void)
 	iounmap(relocation);
 err_reloc:
 	memblock_free(hip04_boot_method[0], hip04_boot_method[1]);
+err_put_node:
+	of_node_put(np_fab);
+	of_node_put(np_sctl);
 err:
 	return ret;
 }
diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c
index da5689a..ecc68fa 100644
--- a/arch/arm/mach-hisi/platsmp.c
+++ b/arch/arm/mach-hisi/platsmp.c
@@ -71,14 +71,17 @@ static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus)
 		ctrl_base = of_iomap(np, 0);
 		if (!ctrl_base) {
 			pr_err("failed to map address\n");
-			return;
+			goto out_put_node;
 		}
 		if (of_property_read_u32(np, "smp-offset", &offset) < 0) {
 			pr_err("failed to find smp-offset property\n");
-			return;
+			goto out_put_node;
 		}
 		ctrl_base += offset;
 	}
+
+out_put_node:
+	of_node_put(np);
 }
 
 static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle)
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 05/15] ARM: imx51: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (2 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 04/15] ARM: hisi: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-04  5:37   ` Shawn Guo
  2019-03-01  8:56 ` [PATCH 06/15] arm: npcm: " Wen Yang
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang, Fabio Estevam, Lucas Stach

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-imx/mach-imx51.c:64:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 57, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-imx/mach-imx51.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
index c7169c2..08c7892 100644
--- a/arch/arm/mach-imx/mach-imx51.c
+++ b/arch/arm/mach-imx/mach-imx51.c
@@ -59,6 +59,7 @@ static void __init imx51_m4if_setup(void)
 		return;
 
 	m4if_base = of_iomap(np, 0);
+	of_node_put(np);
 	if (!m4if_base) {
 		pr_err("Unable to map M4IF registers\n");
 		return;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 06/15] arm: npcm: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (3 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 05/15] ARM: imx51: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-04 15:39   ` Avi Fishman
  2019-03-01  8:56 ` [PATCH 07/15] ARM: rockchip: " Wen Yang
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-npcm/platsmp.c:52:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 31, but without a corresponding object release within this function.
./arch/arm/mach-npcm/platsmp.c:68:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 60, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Avi Fishman <avifishman70@gmail.com>
Cc: Tomer Maimon <tmaimon77@gmail.com>
Cc: Patrick Venture <venture@google.com>
Cc: Nancy Yuen <yuenn@google.com>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: openbmc@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-npcm/platsmp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c
index 21633c7..fe63edc 100644
--- a/arch/arm/mach-npcm/platsmp.c
+++ b/arch/arm/mach-npcm/platsmp.c
@@ -35,6 +35,7 @@ static int npcm7xx_smp_boot_secondary(unsigned int cpu,
 		goto out;
 	}
 	gcr_base = of_iomap(gcr_np, 0);
+	of_node_put(gcr_np);
 	if (!gcr_base) {
 		pr_err("could not iomap gcr");
 		ret = -ENOMEM;
@@ -63,6 +64,7 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)
 		return;
 	}
 	scu_base = of_iomap(scu_np, 0);
+	of_node_put(scu_np);
 	if (!scu_base) {
 		pr_err("could not iomap scu");
 		return;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 07/15] ARM: rockchip: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (4 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 06/15] arm: npcm: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  8:56 ` [PATCH 08/15] ARM: shmobile: " Wen Yang
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-rockchip/pm.c:269:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 259, but without a corresponding object release within this function.
./arch/arm/mach-rockchip/pm.c:275:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 259, but without a corresponding object release within this function
./arch/arm/mach-rockchip/platsmp.c:280:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 271, but without a corresponding object release within this function.
./arch/arm/mach-rockchip/platsmp.c:284:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 271, but without a corresponding object release within this function.
./arch/arm/mach-rockchip/platsmp.c:288:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 271, but without a corresponding object release within this function.
./arch/arm/mach-rockchip/platsmp.c:302:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 293, but without a corresponding object release within this function.
./arch/arm/mach-rockchip/platsmp.c:250:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 241, but without a corresponding object release within this function.
./arch/arm/mach-rockchip/platsmp.c:260:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 241, but without a corresponding object release within this function.
./arch/arm/mach-rockchip/platsmp.c:263:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 241, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-rockchip/platsmp.c | 12 ++++++++----
 arch/arm/mach-rockchip/pm.c      | 11 ++++++-----
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index 51984a4..f93d64e 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -277,19 +277,20 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
 	sram_base_addr = of_iomap(node, 0);
 	if (!sram_base_addr) {
 		pr_err("%s: could not map sram registers\n", __func__);
-		return;
+		goto out_put_node;
 	}
 
 	if (has_pmu && rockchip_smp_prepare_pmu())
-		return;
+		goto out_put_node;
 
 	if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
 		if (rockchip_smp_prepare_sram(node))
-			return;
+			goto out_put_node;
 
 		/* enable the SCU power domain */
 		pmu_set_power_domain(PMU_PWRDN_SCU, true);
 
+		of_node_put(node);
 		node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
 		if (!node) {
 			pr_err("%s: missing scu\n", __func__);
@@ -299,7 +300,7 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
 		scu_base_addr = of_iomap(node, 0);
 		if (!scu_base_addr) {
 			pr_err("%s: could not map scu registers\n", __func__);
-			return;
+			goto out_put_node;
 		}
 
 		/*
@@ -321,6 +322,9 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
 	/* Make sure that all cores except the first are really off */
 	for (i = 1; i < ncores; i++)
 		pmu_set_power_domain(0 + i, false);
+
+out_put_node:
+	of_node_put(node);
 }
 
 static void __init rk3036_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c
index 0592534..43a16c9 100644
--- a/arch/arm/mach-rockchip/pm.c
+++ b/arch/arm/mach-rockchip/pm.c
@@ -266,25 +266,26 @@ static int rk3288_suspend_init(struct device_node *np)
 	rk3288_bootram_base = of_iomap(sram_np, 0);
 	if (!rk3288_bootram_base) {
 		pr_err("%s: could not map bootram base\n", __func__);
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto out_put_node;
 	}
 
 	ret = of_address_to_resource(sram_np, 0, &res);
 	if (ret) {
 		pr_err("%s: could not get bootram phy addr\n", __func__);
-		return ret;
+		goto out_put_node;
 	}
 	rk3288_bootram_phy = res.start;
 
-	of_node_put(sram_np);
-
 	rk3288_config_bootdata();
 
 	/* copy resume code and data to bootsram */
 	memcpy(rk3288_bootram_base, rockchip_slp_cpu_resume,
 	       rk3288_bootram_sz);
 
-	return 0;
+out_put_node:
+	of_node_put(sram_np);
+	return ret;
 }
 
 static const struct platform_suspend_ops rk3288_suspend_ops = {
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 08/15] ARM: shmobile: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (5 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 07/15] ARM: rockchip: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  9:51   ` Geert Uytterhoeven
  2019-03-01  8:56 ` [PATCH 09/15] ARM: socfpga: " Wen Yang
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-shmobile/pm-rcar-gen2.c:77:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
./arch/arm/mach-shmobile/pm-rcar-gen2.c:85:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
./arch/arm/mach-shmobile/pm-rcar-gen2.c:90:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-shmobile/pm-rcar-gen2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
index 8c2a205..e84599d 100644
--- a/arch/arm/mach-shmobile/pm-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c
@@ -72,6 +72,7 @@ void __init rcar_gen2_pm_init(void)
 	}
 
 	error = of_address_to_resource(np, 0, &res);
+	of_node_put(np);
 	if (error) {
 		pr_err("Failed to get smp-sram address: %d\n", error);
 		return;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 09/15] ARM: socfpga: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (6 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 08/15] ARM: shmobile: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  8:56 ` [PATCH 10/15] ARM: sunxi: " Wen Yang
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-socfpga/platsmp.c:93:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 85, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-socfpga/platsmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index 0ee7677..55c2884 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -89,6 +89,7 @@ static void __init socfpga_smp_prepare_cpus(unsigned int max_cpus)
 	}
 
 	socfpga_scu_base_addr = of_iomap(np, 0);
+	of_node_put(np);
 	if (!socfpga_scu_base_addr)
 		return;
 	scu_enable(socfpga_scu_base_addr);
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 10/15] ARM: sunxi: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (7 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 09/15] ARM: socfpga: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  8:56 ` [PATCH 11/15] ARM: versatile: " Wen Yang
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-sunxi/platsmp.c:55:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 46, but without a corresponding object release within this function.
./arch/arm/mach-sunxi/platsmp.c:138:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 129, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-sunxi/platsmp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
index 8fb5088..c842209 100644
--- a/arch/arm/mach-sunxi/platsmp.c
+++ b/arch/arm/mach-sunxi/platsmp.c
@@ -50,6 +50,7 @@ static void __init sun6i_smp_prepare_cpus(unsigned int max_cpus)
 	}
 
 	prcm_membase = of_iomap(node, 0);
+	of_node_put(node);
 	if (!prcm_membase) {
 		pr_err("Couldn't map A31 PRCM registers\n");
 		return;
@@ -63,6 +64,7 @@ static void __init sun6i_smp_prepare_cpus(unsigned int max_cpus)
 	}
 
 	cpucfg_membase = of_iomap(node, 0);
+	of_node_put(node);
 	if (!cpucfg_membase)
 		pr_err("Couldn't map A31 CPU config registers\n");
 
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 11/15] ARM: versatile: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (8 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 10/15] ARM: sunxi: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01 13:30   ` Linus Walleij
  2019-03-01  8:56 ` [PATCH 12/15] ARM: vexpress: " Wen Yang
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-versatile/versatile_dt.c:315:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 302, but without a corresponding object release within this function.
./arch/arm/mach-versatile/versatile_dt.c:320:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 302, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-versatile/versatile_dt.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index e9d6068..028463a 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -312,12 +312,12 @@ static void __init versatile_dt_pci_init(void)
 		 * driver had it so we will keep it.
 		 */
 		writel(1, versatile_sys_base + VERSATILE_SYS_PCICTL_OFFSET);
-		return;
+		goto out_put_node;
 	}
 
 	newprop = kzalloc(sizeof(*newprop), GFP_KERNEL);
 	if (!newprop)
-		return;
+		goto out_put_node;
 
 	newprop->name = kstrdup("status", GFP_KERNEL);
 	newprop->value = kstrdup("disabled", GFP_KERNEL);
@@ -325,6 +325,9 @@ static void __init versatile_dt_pci_init(void)
 	of_update_property(np, newprop);
 
 	pr_info("Not plugged into PCI backplane!\n");
+
+out_put_node:
+	of_node_put(np);
 }
 
 static void __init versatile_dt_init(void)
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 12/15] ARM: vexpress: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (9 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 11/15] ARM: versatile: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-04 14:46   ` Sudeep Holla
  2019-03-01  8:56 ` [PATCH 13/15] ARM: zynq: " Wen Yang
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-vexpress/dcscb.c:150:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 145, but without a corresponding object release within this function.
./arch/arm/mach-vexpress/dcscb.c:160:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 145, but without a corresponding object release within this function.
./arch/arm/mach-vexpress/dcscb.c:171:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 145, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-vexpress/dcscb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c
index ee2a0fa..aaade91 100644
--- a/arch/arm/mach-vexpress/dcscb.c
+++ b/arch/arm/mach-vexpress/dcscb.c
@@ -146,6 +146,7 @@ static int __init dcscb_init(void)
 	if (!node)
 		return -ENODEV;
 	dcscb_base = of_iomap(node, 0);
+	of_node_put(node);
 	if (!dcscb_base)
 		return -EADDRNOTAVAIL;
 	cfg = readl_relaxed(dcscb_base + DCS_CFG_R);
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 13/15] ARM: zynq: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (10 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 12/15] ARM: vexpress: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  8:56 ` [PATCH 14/15] arm64: cpu_ops: " Wen Yang
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-zynq/common.c:89:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 80, but without a corresponding object release within this function.
./arch/arm/mach-zynq/common.c:98:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 80, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-zynq/common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 6aba9eb..a8b1b9c 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -84,6 +84,7 @@ static int __init zynq_get_revision(void)
 	}
 
 	zynq_devcfg_base = of_iomap(np, 0);
+	of_node_put(np);
 	if (!zynq_devcfg_base) {
 		pr_err("%s: Unable to map I/O memory\n", __func__);
 		return -1;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 14/15] arm64: cpu_ops: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (11 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 13/15] ARM: zynq: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01  8:56 ` [PATCH 15/15] ARM: axxia: " Wen Yang
  2019-03-01 15:55 ` [PATCH 01/15] ARM: actions: " Manivannan Sadhasivam
  14 siblings, 0 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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/arm64/kernel/cpu_ops.c:102:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 69, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm64/kernel/cpu_ops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c
index ea00124..00f8b86 100644
--- a/arch/arm64/kernel/cpu_ops.c
+++ b/arch/arm64/kernel/cpu_ops.c
@@ -85,6 +85,7 @@ static const char *__init cpu_read_enable_method(int cpu)
 				pr_err("%pOF: missing enable-method property\n",
 					dn);
 		}
+		of_node_put(dn);
 	} else {
 		enable_method = acpi_get_enable_method(cpu);
 		if (!enable_method) {
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 15/15] ARM: axxia: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (12 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 14/15] arm64: cpu_ops: " Wen Yang
@ 2019-03-01  8:56 ` Wen Yang
  2019-03-01 15:55 ` [PATCH 01/15] ARM: actions: " Manivannan Sadhasivam
  14 siblings, 0 replies; 28+ messages in thread
From: Wen Yang @ 2019-03-01  8:56 UTC (permalink / raw)
  To: liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59, Wen Yang

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-axxia/platsmp.c:46:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 40, but without a corresponding object release within this function.
./arch/arm/mach-axxia/platsmp.c:53:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 40, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-axxia/platsmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index 502e3df..c706a11 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -42,6 +42,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)
 		return -ENOENT;
 
 	syscon = of_iomap(syscon_np, 0);
+	of_node_put(syscon_np);
 	if (!syscon)
 		return -ENOMEM;
 
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 03/15] ARM: exynos: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 ` [PATCH 03/15] ARM: exynos: " Wen Yang
@ 2019-03-01  9:14   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2019-03-01  9:14 UTC (permalink / raw)
  To: Wen Yang
  Cc: liviu.dudau, sudeep.holla, lorenzo.pieralisi, linux,
	linux-arm-kernel, linux-kernel, kgene, linux-samsung-soc,
	michal.simek, afaerber, manivannan.sadhasivam, dinguyen, heiko,
	linux-rockchip, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, linus.walleij, avifishman70, tmaimon77,
	venture, yuenn, brendanhiggins, openbmc, xuwei5, maxime.ripard,
	wens, catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59

On Fri, 1 Mar 2019 at 09:57, Wen Yang <wen.yang99@zte.com.cn> 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-exynos/firmware.c:201:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 193, but without a corresponding object release within this function.
> ./arch/arm/mach-exynos/firmware.c:204:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 193, but without a corresponding object release within this function.
> ./arch/arm/mach-exynos/suspend.c:642:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 634, but without a corresponding object release within this function.

Thanks, looks good. I'll take it however after merge window.

There are no dependencies between patches therefore you could limit
the amount of people you CC. You put specific "Cc" fields in patch but
you did not use them and sent it to 40 addresses. The CC in the patch
has exactly this purpose - do not send everything to everyone...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 08/15] ARM: shmobile: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 ` [PATCH 08/15] ARM: shmobile: " Wen Yang
@ 2019-03-01  9:51   ` Geert Uytterhoeven
  2019-03-04 10:24     ` Simon Horman
  0 siblings, 1 reply; 28+ messages in thread
From: Geert Uytterhoeven @ 2019-03-01  9:51 UTC (permalink / raw)
  To: Wen Yang
  Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	Linux ARM, Linux Kernel Mailing List, Kukjin Kim,
	Krzysztof Kozlowski, linux-samsung-soc, Michal Simek,
	Andreas Färber, Manivannan Sadhasivam, Dinh Nguyen,
	Heiko Stuebner, open list:ARM/Rockchip SoC...,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Linus Walleij, avifishman70, tmaimon77,
	venture, yuenn, brendanhiggins, openbmc, Wei Xu, Maxime Ripard,
	Chen-Yu Tsai, Catalin Marinas, Will Deacon, Simon Horman,
	Magnus Damm, Linux-Renesas, Shawn Guo, Sascha Hauer,
	Sascha Hauer, Fabio Estevam, linux-imx, wang.yi59

On Fri, Mar 1, 2019 at 9:57 AM Wen Yang <wen.yang99@zte.com.cn> 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-shmobile/pm-rcar-gen2.c:77:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
> ./arch/arm/mach-shmobile/pm-rcar-gen2.c:85:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
> ./arch/arm/mach-shmobile/pm-rcar-gen2.c:90:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
>
> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 11/15] ARM: versatile: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 ` [PATCH 11/15] ARM: versatile: " Wen Yang
@ 2019-03-01 13:30   ` Linus Walleij
  0 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2019-03-01 13:30 UTC (permalink / raw)
  To: Wen Yang
  Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	Linux ARM, linux-kernel, Kukjin Kim, Krzysztof Kozlowski,
	linux-samsung-soc, Michal Simek, Andreas Färber,
	Manivannan Sadhasivam, Dinh Nguyen, Heiko Stübner,
	open list:ARM/Rockchip SoC...,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, avifishman70, 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

On Fri, Mar 1, 2019 at 9:57 AM Wen Yang <wen.yang99@zte.com.cn> 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-versatile/versatile_dt.c:315:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 302, but without a corresponding object release within this function.
> ./arch/arm/mach-versatile/versatile_dt.c:320:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 302, but without a corresponding object release within this function.
>
> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org

Patch applied. Will send upstream next kernel cycle or so.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
                   ` (13 preceding siblings ...)
  2019-03-01  8:56 ` [PATCH 15/15] ARM: axxia: " Wen Yang
@ 2019-03-01 15:55 ` Manivannan Sadhasivam
  2019-03-04 12:29   ` Linus Walleij
  14 siblings, 1 reply; 28+ messages in thread
From: Manivannan Sadhasivam @ 2019-03-01 15:55 UTC (permalink / raw)
  To: Wen Yang, linus.walleij, afaerber
  Cc: liviu.dudau, sudeep.holla, lorenzo.pieralisi, linux,
	linux-arm-kernel, linux-kernel, kgene, krzk, linux-samsung-soc,
	michal.simek, dinguyen, heiko, linux-rockchip, f.fainelli, rjui,
	sbranden, bcm-kernel-feedback-list, avifishman70, tmaimon77,
	venture, yuenn, brendanhiggins, openbmc, xuwei5, maxime.ripard,
	wens, catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59

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?

Thanks,
Mani

> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
> Cc: "Andreas Färber" <afaerber@suse.de>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  arch/arm/mach-actions/platsmp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c
> index 4fd479c..1a8e078 100644
> --- a/arch/arm/mach-actions/platsmp.c
> +++ b/arch/arm/mach-actions/platsmp.c
> @@ -107,6 +107,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
>  	}
>  
>  	timer_base_addr = of_iomap(node, 0);
> +	of_node_put(node);
>  	if (!timer_base_addr) {
>  		pr_err("%s: could not map timer registers\n", __func__);
>  		return;
> @@ -119,6 +120,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
>  	}
>  
>  	sps_base_addr = of_iomap(node, 0);
> +	of_node_put(node);
>  	if (!sps_base_addr) {
>  		pr_err("%s: could not map sps registers\n", __func__);
>  		return;
> @@ -132,6 +134,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
>  		}
>  
>  		scu_base_addr = of_iomap(node, 0);
> +		of_node_put(node);
>  		if (!scu_base_addr) {
>  			pr_err("%s: could not map scu registers\n", __func__);
>  			return;
> -- 
> 2.9.5
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 02/15] ARM: bcm: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 ` [PATCH 02/15] ARM: bcm: " Wen Yang
@ 2019-03-01 18:28   ` Florian Fainelli
  0 siblings, 0 replies; 28+ messages in thread
From: Florian Fainelli @ 2019-03-01 18:28 UTC (permalink / raw)
  To: Wen Yang, liviu.dudau
  Cc: sudeep.holla, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	rjui, sbranden, bcm-kernel-feedback-list, linus.walleij,
	avifishman70, tmaimon77, venture, yuenn, brendanhiggins, openbmc,
	xuwei5, maxime.ripard, wens, catalin.marinas, will.deacon, horms,
	magnus.damm, linux-renesas-soc, shawnguo, s.hauer, kernel,
	fabio.estevam, linux-imx, wang.yi59

On 3/1/19 12:56 AM, 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-bcm/board_bcm281xx.c:43:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 35, but without a corresponding object release within this function.

This looks fine, if you resubmit, can you add a missing space between
"adding" and "missing"? This applies to all of your patches, so I am
assuming you somehow scripted that, which should be easy to fix.

With that changed:

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 05/15] ARM: imx51: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 ` [PATCH 05/15] ARM: imx51: " Wen Yang
@ 2019-03-04  5:37   ` Shawn Guo
  0 siblings, 0 replies; 28+ messages in thread
From: Shawn Guo @ 2019-03-04  5:37 UTC (permalink / raw)
  To: Wen Yang
  Cc: liviu.dudau, sudeep.holla, lorenzo.pieralisi, linux,
	linux-arm-kernel, linux-kernel, kgene, krzk, linux-samsung-soc,
	michal.simek, afaerber, manivannan.sadhasivam, dinguyen, heiko,
	linux-rockchip, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, linus.walleij, avifishman70, tmaimon77,
	venture, yuenn, brendanhiggins, openbmc, xuwei5, maxime.ripard,
	wens, catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, s.hauer, kernel, fabio.estevam, linux-imx,
	wang.yi59, Fabio Estevam, Lucas Stach

On Fri, Mar 01, 2019 at 04:56:46PM +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-imx/mach-imx51.c:64:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 57, but without a corresponding object release within this function.
> 
> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>

Applied, thanks.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 08/15] ARM: shmobile: fix a leaked reference by addingmissing of_node_put
  2019-03-01  9:51   ` Geert Uytterhoeven
@ 2019-03-04 10:24     ` Simon Horman
  0 siblings, 0 replies; 28+ messages in thread
From: Simon Horman @ 2019-03-04 10:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Wen Yang, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Russell King, Linux ARM, Linux Kernel Mailing List, Kukjin Kim,
	Krzysztof Kozlowski, linux-samsung-soc, Michal Simek,
	Andreas Färber, Manivannan Sadhasivam, Dinh Nguyen,
	Heiko Stuebner, open list:ARM/Rockchip SoC...,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Linus Walleij, avifishman70, tmaimon77,
	venture, yuenn, brendanhiggins, openbmc, Wei Xu, Maxime Ripard,
	Chen-Yu Tsai, Catalin Marinas, Will Deacon, Magnus Damm,
	Linux-Renesas, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, linux-imx, wang.yi59

On Fri, Mar 01, 2019 at 10:51:27AM +0100, Geert Uytterhoeven wrote:
> On Fri, Mar 1, 2019 at 9:57 AM Wen Yang <wen.yang99@zte.com.cn> 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-shmobile/pm-rcar-gen2.c:77:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
> > ./arch/arm/mach-shmobile/pm-rcar-gen2.c:85:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
> > ./arch/arm/mach-shmobile/pm-rcar-gen2.c:90:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function.
> >
> > Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thanks, applied for v5.2.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put
  2019-03-01 15:55 ` [PATCH 01/15] ARM: actions: " Manivannan Sadhasivam
@ 2019-03-04 12:29   ` Linus Walleij
  2019-03-04 14:48     ` Manivannan Sadhasivam
  0 siblings, 1 reply; 28+ messages in thread
From: Linus Walleij @ 2019-03-04 12:29 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Wen Yang, Andreas Färber, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Russell King, Linux ARM, linux-kernel,
	Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc, Michal Simek,
	Dinh Nguyen, Heiko Stübner, open list:ARM/Rockchip SoC...,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, avifishman70, 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

On Fri, Mar 1, 2019 at 4:55 PM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> 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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 12/15] ARM: vexpress: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 ` [PATCH 12/15] ARM: vexpress: " Wen Yang
@ 2019-03-04 14:46   ` Sudeep Holla
  0 siblings, 0 replies; 28+ messages in thread
From: Sudeep Holla @ 2019-03-04 14:46 UTC (permalink / raw)
  To: Wen Yang
  Cc: liviu.dudau, lorenzo.pieralisi, linux, linux-arm-kernel,
	linux-kernel, kgene, krzk, linux-samsung-soc, michal.simek,
	afaerber, manivannan.sadhasivam, dinguyen, heiko, linux-rockchip,
	f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
	linus.walleij, avifishman70, tmaimon77, venture, yuenn,
	brendanhiggins, openbmc, xuwei5, maxime.ripard, wens,
	catalin.marinas, will.deacon, horms, magnus.damm,
	linux-renesas-soc, shawnguo, s.hauer, kernel, fabio.estevam,
	linux-imx, wang.yi59

On Fri, Mar 01, 2019 at 04:56:53PM +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-vexpress/dcscb.c:150:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 145, but without a corresponding object release within this function.
> ./arch/arm/mach-vexpress/dcscb.c:160:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 145, but without a corresponding object release within this function.
> ./arch/arm/mach-vexpress/dcscb.c:171:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 145, but without a corresponding object release within this function.
> 
> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>

Looks good, assuming you want to take this as a series. Please shout if
you want us to take this.

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put
  2019-03-04 12:29   ` Linus Walleij
@ 2019-03-04 14:48     ` Manivannan Sadhasivam
  2019-03-04 22:37       ` Linus Walleij
  0 siblings, 1 reply; 28+ messages in thread
From: Manivannan Sadhasivam @ 2019-03-04 14:48 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Wen Yang, Andreas Färber, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Russell King, Linux ARM, linux-kernel,
	Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc, Michal Simek,
	Dinh Nguyen, Heiko Stübner, open list:ARM/Rockchip SoC...,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, avifishman70, 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

Hi Linus,

On Mon, Mar 04, 2019 at 01:29:33PM +0100, Linus Walleij wrote:
> On Fri, Mar 1, 2019 at 4:55 PM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> 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.

Thanks,
Mani

> 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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 06/15] arm: npcm: fix a leaked reference by addingmissing of_node_put
  2019-03-01  8:56 ` [PATCH 06/15] arm: npcm: " Wen Yang
@ 2019-03-04 15:39   ` Avi Fishman
  0 siblings, 0 replies; 28+ messages in thread
From: Avi Fishman @ 2019-03-04 15:39 UTC (permalink / raw)
  To: Wen Yang
  Cc: liviu.dudau, sudeep.holla, lorenzo.pieralisi, Russell King,
	Linux ARM, Linux Kernel Mailing List, kgene, krzk,
	linux-samsung-soc, michal.simek, afaerber, manivannan.sadhasivam,
	dinguyen, heiko, linux-rockchip, Florian Fainelli, rjui,
	sbranden, bcm-kernel-feedback-list, linus.walleij, Tomer Maimon,
	Patrick Venture, Nancy Yuen, Brendan Higgins, OpenBMC Maillist,
	xuwei5, maxime.ripard, wens, catalin.marinas, will.deacon, horms,
	magnus.damm, linux-renesas-soc, shawnguo, s.hauer, kernel,
	fabio.estevam, linux-imx, wang.yi59

Reviewed-by: Avi Fishman <avifishman70@gmail.com>

Thanks

On Fri, Mar 1, 2019 at 10:57 AM Wen Yang <wen.yang99@zte.com.cn> 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-npcm/platsmp.c:52:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 31, but without a corresponding object release within this function.
> ./arch/arm/mach-npcm/platsmp.c:68:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 60, but without a corresponding object release within this function.
>
> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
> Cc: Avi Fishman <avifishman70@gmail.com>
> Cc: Tomer Maimon <tmaimon77@gmail.com>
> Cc: Patrick Venture <venture@google.com>
> Cc: Nancy Yuen <yuenn@google.com>
> Cc: Brendan Higgins <brendanhiggins@google.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: openbmc@lists.ozlabs.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  arch/arm/mach-npcm/platsmp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c
> index 21633c7..fe63edc 100644
> --- a/arch/arm/mach-npcm/platsmp.c
> +++ b/arch/arm/mach-npcm/platsmp.c
> @@ -35,6 +35,7 @@ static int npcm7xx_smp_boot_secondary(unsigned int cpu,
>                 goto out;
>         }
>         gcr_base = of_iomap(gcr_np, 0);
> +       of_node_put(gcr_np);
>         if (!gcr_base) {
>                 pr_err("could not iomap gcr");
>                 ret = -ENOMEM;
> @@ -63,6 +64,7 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)
>                 return;
>         }
>         scu_base = of_iomap(scu_np, 0);
> +       of_node_put(scu_np);
>         if (!scu_base) {
>                 pr_err("could not iomap scu");
>                 return;
> --
> 2.9.5
>


-- 
Regards,
Avi

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put
  2019-03-04 14:48     ` Manivannan Sadhasivam
@ 2019-03-04 22:37       ` Linus Walleij
       [not found]         ` <CAOZjjhnDYHkWCd-zDqkFpg5FPoj-UxxNwVxfbg6QEahiASm10w@mail.gmail.com>
  0 siblings, 1 reply; 28+ messages in thread
From: Linus Walleij @ 2019-03-04 22:37 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Wen Yang, Andreas Färber, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Russell King, Linux ARM, linux-kernel,
	Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc, Michal Simek,
	Dinh Nguyen, Heiko Stübner, open list:ARM/Rockchip SoC...,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, avifishman70, 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

On Mon, Mar 4, 2019 at 3:48 PM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> 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
> > <manivannan.sadhasivam@linaro.org> 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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put
       [not found]         ` <CAOZjjhnDYHkWCd-zDqkFpg5FPoj-UxxNwVxfbg6QEahiASm10w@mail.gmail.com>
@ 2019-03-05  9:55           ` Russell King - ARM Linux admin
  0 siblings, 0 replies; 28+ messages in thread
From: Russell King - ARM Linux admin @ 2019-03-05  9:55 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Linus Walleij, Wen Yang, Andreas Färber, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Linux ARM, linux-kernel,
	Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc, Michal Simek,
	Dinh Nguyen, Heiko Stübner, open list:ARM/Rockchip SoC...,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, avifishman70, 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

On Tue, Mar 05, 2019 at 07:21:19AM +0530, Manivannan Sadhasivam wrote:
> On Tue, 5 Mar, 2019, 4:08 AM Linus Walleij <linus.walleij@linaro.org wrote:
> 
> > On Mon, Mar 4, 2019 at 3:48 PM Manivannan Sadhasivam
> > <manivannan.sadhasivam@linaro.org> 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
> > > > <manivannan.sadhasivam@linaro.org> 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().
> >
> 
> Nope. platsmp.c still requires some cleanup like removing the redundant
> bootlock and pen_release flag as pointed out by Russel. Andreas just
> replied to your cleanup patches but there was no follow up since that. So,
> I guess we can just apply Russell's patches and this patch once Andreas is
> fine with it (it looks good to me though).

No.  My patches are in my tree queued for this merge window.  They
are part of a series that can not be broken up and merged separately
because all the per-platform patches need to be merged before the final
patch "ARM: smp: remove arch-provided "pen_release"" otherwise the
platforms break.  I thought that was already explained.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2019-03-05  9:55 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01  8:56 [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put Wen Yang
2019-03-01  8:56 ` [PATCH 02/15] ARM: bcm: " Wen Yang
2019-03-01 18:28   ` Florian Fainelli
2019-03-01  8:56 ` [PATCH 03/15] ARM: exynos: " Wen Yang
2019-03-01  9:14   ` Krzysztof Kozlowski
2019-03-01  8:56 ` [PATCH 04/15] ARM: hisi: " Wen Yang
2019-03-01  8:56 ` [PATCH 05/15] ARM: imx51: " Wen Yang
2019-03-04  5:37   ` Shawn Guo
2019-03-01  8:56 ` [PATCH 06/15] arm: npcm: " Wen Yang
2019-03-04 15:39   ` Avi Fishman
2019-03-01  8:56 ` [PATCH 07/15] ARM: rockchip: " Wen Yang
2019-03-01  8:56 ` [PATCH 08/15] ARM: shmobile: " Wen Yang
2019-03-01  9:51   ` Geert Uytterhoeven
2019-03-04 10:24     ` Simon Horman
2019-03-01  8:56 ` [PATCH 09/15] ARM: socfpga: " Wen Yang
2019-03-01  8:56 ` [PATCH 10/15] ARM: sunxi: " Wen Yang
2019-03-01  8:56 ` [PATCH 11/15] ARM: versatile: " Wen Yang
2019-03-01 13:30   ` Linus Walleij
2019-03-01  8:56 ` [PATCH 12/15] ARM: vexpress: " Wen Yang
2019-03-04 14:46   ` Sudeep Holla
2019-03-01  8:56 ` [PATCH 13/15] ARM: zynq: " Wen Yang
2019-03-01  8:56 ` [PATCH 14/15] arm64: cpu_ops: " Wen Yang
2019-03-01  8:56 ` [PATCH 15/15] ARM: axxia: " Wen Yang
2019-03-01 15:55 ` [PATCH 01/15] ARM: actions: " Manivannan Sadhasivam
2019-03-04 12:29   ` Linus Walleij
2019-03-04 14:48     ` Manivannan Sadhasivam
2019-03-04 22:37       ` Linus Walleij
     [not found]         ` <CAOZjjhnDYHkWCd-zDqkFpg5FPoj-UxxNwVxfbg6QEahiASm10w@mail.gmail.com>
2019-03-05  9:55           ` Russell King - ARM Linux admin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).