Patch "powerpc/pseries: Fix parent_dn reference leak in add_dt_node()" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
powerpc/pseries: Fix parent_dn reference leak in add_dt_node()
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:
powerpc-pseries-fix-parent_dn-reference-leak-in-add_dt_node.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
b537ca6fede69a281dc524983e5e633d79a10a08Mon Sep 17 00:00:00 2001
From: Tyrel Datwyler <[email protected]>
Date: Wed, 20 Sep 2017 17:02:52 -0400
Subject: powerpc/pseries: Fix parent_dn reference leak in add_dt_node()
From: Tyrel Datwyler <[email protected]>
commit b537ca6fede69a281dc524983e5e633d79a10a08 upstream.
A reference to the parent device node is held by add_dt_node() for the node to be added. If the call to dlpar_configure_connector() fails add_dt_node() returns ENOENT and that reference is not freed.
Add a call to of_node_put(parent_dn) prior to bailing out after a failed dlpar_configure_connector() call.
--- arch/powerpc/platforms/pseries/mobility.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/mobility.c +3 -1
@@ -225,8 +225,10 @@ static int add_dt_node(__be32 parent_phareturn -ENOENT ; dn =dlpar_configure_connector (drc_index, parent_dn); -if (!dn) +if (!dn) { +of_node_put (parent_dn);return -ENOENT ; + } rc =dlpar_attach_node (dn);if (rc)
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/powerpc-pseries-fix-parent_dn-reference-leak-in-add_dt_node.patch