linux-stable/drivers/of
Qi Hou 0549bde0fc of: fix of_node leak caused in of_find_node_opts_by_path
During stepping down the tree, parent node is gotten first and its refcount is
increased with of_node_get() in __of_get_next_child(). Since it just being used
as tmp node, its refcount must be decreased with of_node_put() after traversing
its child nodes.

Or, its refcount will never be descreased to ZERO, then it will never be freed,
as well as other related memory blocks.

To fix this, decrease refcount of parent with of_node_put() after
__of_find_node_by_path().

Signed-off-by: Qi Hou <qi.hou@windriver.com>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-02-09 09:11:30 -06:00
..
unittest-data of/unittest: replace 'selftest' with 'unittest' 2015-03-25 00:53:29 -05:00
address.c of: use pr_fmt prefix for all console printing 2016-07-18 16:57:42 -05:00
base.c of: fix of_node leak caused in of_find_node_opts_by_path 2017-02-09 09:11:30 -06:00
device.c iommu: of: enforce const-ness of struct iommu_ops 2016-05-09 15:33:29 +02:00
dynamic.c of: use pr_fmt prefix for all console printing 2016-07-18 16:57:42 -05:00
fdt.c of/fdt: mark hotpluggable memory 2016-12-12 18:55:07 -08:00
fdt_address.c of: use pr_fmt prefix for all console printing 2016-07-18 16:57:42 -05:00
irq.c of/irq: improve error report on irq discovery process failure 2017-01-09 09:52:17 -06:00
Kconfig mtd: Kill the OF_MTD Kconfig option 2016-09-23 09:35:16 +02:00
Makefile MTD updates for v4.7: 2016-05-24 11:00:20 -07:00
of_mdio.c of_mdio: add helper to deregister fixed-link PHYs 2016-11-29 23:17:02 -05:00
of_net.c of_net: factor out repetitive code from of_get_mac_address() 2015-03-29 08:56:17 +01:00
of_numa.c of, numa: Return NUMA_NO_NODE from disable of_node_to_nid() if nid not possible. 2016-11-15 09:17:12 -06:00
of_pci.c of/pci: Add of_pci_get_max_link_speed() to parse max-link-speed from DT 2016-11-14 15:21:14 -06:00
of_pci_irq.c of/irq: improve error report on irq discovery process failure 2017-01-09 09:52:17 -06:00
of_private.h of: fix memory leak related to safe_name() 2016-06-24 15:16:10 -05:00
of_reserved_mem.c of: reserved_mem: set dma_ops for devices using reserved mem 2017-01-04 14:00:45 -06:00
overlay.c of: remove redundant memset in overlay 2017-01-09 14:21:23 -06:00
pdt.c
platform.c of/platform: clarify of_find_device_by_node refcounting 2016-11-15 09:17:19 -06:00
resolver.c of: drop duplicate headers 2017-01-04 14:01:28 -06:00
unittest.c of/unittest: Swap arguments of of_unittest_apply_overlay() 2017-01-23 14:58:03 -06:00