Patch "of/base: release the node correctly in of_parse_phandle_with_args()" has been added to the 3.9-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/base: release the node correctly in of_parse_phandle_with_args()

to the 3.9-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-base-release-the-node-correctly-in-of_parse_phandle_with_args.patch
and it can be found in the queue-3.9 subdirectory.

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


>From b855f16b05a697ac1863adabe99bfba56e6d3199 Mon Sep 17 00:00:00 2001
From: Tang Yuantian <yuantian.tang@xxxxxxxxxxxxx>
Date: Wed, 10 Apr 2013 11:36:39 +0800
Subject: of/base: release the node correctly in of_parse_phandle_with_args()

From: Tang Yuantian <yuantian.tang@xxxxxxxxxxxxx>

commit b855f16b05a697ac1863adabe99bfba56e6d3199 upstream.

Call of_node_put() only when the out_args is NULL on success,
or the node's reference count will not be correct because the caller
will call of_node_put() again.

Signed-off-by: Tang Yuantian <Yuantian.Tang@xxxxxxxxxxxxx>
[grant.likely: tightened up the patch]
Signed-off-by: Grant Likely <grant.likely@xxxxxxxxxx>
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/of/base.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1166,11 +1166,11 @@ static int __of_parse_phandle_with_args(
 				out_args->args_count = count;
 				for (i = 0; i < count; i++)
 					out_args->args[i] = be32_to_cpup(list++);
+			} else {
+				of_node_put(node);
 			}
 
 			/* Found it! return success */
-			if (node)
-				of_node_put(node);
 			return 0;
 		}
 


Patches currently in stable-queue which might be from yuantian.tang@xxxxxxxxxxxxx are

queue-3.9/of-base-release-the-node-correctly-in-of_parse_phandle_with_args.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]