Patch "of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()

to the 6.1-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-overlay-fix-missing-of_node_put-in-error-case-of-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 142594e629332ec35cc579cc8cdab0d9cedadfd6
Author: Kunihiko Hayashi <hayashi.kunihiko@xxxxxxxxxxxxx>
Date:   Fri Jun 2 11:05:02 2023 +0900

    of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()
    
    [ Upstream commit 39affd1fdf65983904fafc07cf607cff737eaf30 ]
    
    In init_overlay_changeset(), the variable "node" is from
    of_get_child_by_name(), and the "node" should be discarded in error case.
    
    Fixes: d1651b03c2df ("of: overlay: add overlay symbols to live device tree")
    Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230602020502.11693-1-hayashi.kunihiko@xxxxxxxxxxxxx
    Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index ed4e6c144a681..5289975bad708 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -811,6 +811,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs)
 		if (!fragment->target) {
 			pr_err("symbols in overlay, but not in live tree\n");
 			ret = -EINVAL;
+			of_node_put(node);
 			goto err_out;
 		}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux