This is a note to let you know that I've just added the patch titled of_mdio: fix node leak in of_phy_register_fixed_link error path 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: of_mdio-fix-node-leak-in-of_phy_register_fixed_link-error-path.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 <stable@xxxxxxxxxxxxxxx> know about it. >From 48c1699d5335bc045b50989a06b1c526b17a25ff Mon Sep 17 00:00:00 2001 From: Johan Hovold <johan@xxxxxxxxxx> Date: Wed, 16 Nov 2016 15:20:36 +0100 Subject: of_mdio: fix node leak in of_phy_register_fixed_link error path From: Johan Hovold <johan@xxxxxxxxxx> commit 48c1699d5335bc045b50989a06b1c526b17a25ff upstream. Make sure to drop the of_node reference also on failure to parse the speed property in of_phy_register_fixed_link(). Fixes: 3be2a49e5c08 ("of: provide a binding for fixed link PHYs") Signed-off-by: Johan Hovold <johan@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/of/of_mdio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -334,8 +334,11 @@ int of_phy_register_fixed_link(struct de status.link = 1; status.duplex = of_property_read_bool(fixed_link_node, "full-duplex"); - if (of_property_read_u32(fixed_link_node, "speed", &status.speed)) + if (of_property_read_u32(fixed_link_node, "speed", + &status.speed)) { + of_node_put(fixed_link_node); return -EINVAL; + } status.pause = of_property_read_bool(fixed_link_node, "pause"); status.asym_pause = of_property_read_bool(fixed_link_node, "asym-pause"); Patches currently in stable-queue which might be from johan@xxxxxxxxxx are queue-4.4/of_mdio-fix-node-leak-in-of_phy_register_fixed_link-error-path.patch queue-4.4/net-ethernet-gianfar-fix-fixed-link-phydev-leaks.patch queue-4.4/net-ethernet-ucc_geth-fix-fixed-link-phydev-leaks.patch queue-4.4/phy-fix-device-reference-leaks.patch queue-4.4/net-dsa-slave-fix-of-node-leak-and-phy-priority.patch queue-4.4/net-ethernet-marvell-mvneta-fix-fixed-link-phydev-leaks.patch queue-4.4/net-ethernet-fs_enet-fix-fixed-link-phydev-leaks.patch