Skip to contentSkip to conversation

Patch "ARM: OMAP2+: Release device node after it is no longer needed." has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Dec 12, 2017

Subsystems (5)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ARM: OMAP2+: Release device node after it is no longer needed.

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
arm-omap2-release-device-node-after-it-is-no-longer-needed.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Dec 12 13:38:50 CET 2017

From: Guenter Roeck <[email protected]>
Date: Sat, 4 Mar 2017 07:02:11 -0800
Subject: ARM: OMAP2+: Release device node after it is no longer needed.

From: Guenter Roeck <[email protected]>

[ Upstream commit b92675d998a9fa37fe9e0e35053a95b4a23c158b ]

The device node returned by of_find_node_by_name() needs to be released after it is no longer needed to avoid a device node leak.

---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +7 -2
@@ -3967,15 +3967,20 @@ int __init omap3xxx_hwmod_init(void)
 
 	if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
 		r = omap_hwmod_register_links(h_sham);
-		if (r < 0)
+		if (r < 0) {
+			of_node_put(bus);
 			return r;
+		}
 	}
 
 	if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
 		r = omap_hwmod_register_links(h_aes);
-		if (r < 0)
+		if (r < 0) {
+			of_node_put(bus);
 			return r;
+		}
 	}
+	of_node_put(bus);
 
 	/*
 	 * Register hwmod links specific to certain ES levels of a

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/arm-omap2-release-device-node-after-it-is-no-longer-needed.patch queue-4.4/arm-omap2-fix-device-node-reference-counts.patch