This is a note to let you know that I've just added the patch titled of: overlay: kmemleak in dup_and_fixup_symbol_prop() to the 5.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-overlay-kmemleak-in-dup_and_fixup_symbol_prop.patch and it can be found in the queue-5.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 478ff649b1c8eb2409b1a54fb75eb46f7c29f140 Mon Sep 17 00:00:00 2001 From: Frank Rowand <frank.rowand@xxxxxxxx> Date: Thu, 16 Apr 2020 16:42:49 -0500 Subject: of: overlay: kmemleak in dup_and_fixup_symbol_prop() From: Frank Rowand <frank.rowand@xxxxxxxx> commit 478ff649b1c8eb2409b1a54fb75eb46f7c29f140 upstream. kmemleak reports several memory leaks from devicetree unittest. This is the fix for problem 4 of 5. target_path was not freed in the non-error path. Fixes: e0a58f3e08d4 ("of: overlay: remove a dependency on device node full_name") Reported-by: Erhard F. <erhard_f@xxxxxxxxxxx> Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxx> Signed-off-by: Rob Herring <robh@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/of/overlay.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -261,6 +261,8 @@ static struct property *dup_and_fixup_sy of_property_set_flag(new_prop, OF_DYNAMIC); + kfree(target_path); + return new_prop; err_free_new_prop: Patches currently in stable-queue which might be from frank.rowand@xxxxxxxx are queue-5.4/of-overlay-kmemleak-in-dup_and_fixup_symbol_prop.patch queue-5.4/of-unittest-kmemleak-in-of_unittest_platform_populate.patch queue-5.4/of-unittest-kmemleak-on-changeset-destroy.patch queue-5.4/of-unittest-kmemleak-in-of_unittest_overlay_high_level.patch