lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Apr 2016 10:18:46 +0900
From:	Masahiro Yamada <yamada.masahiro@...ionext.com>
To:	devicetree@...r.kernel.org
Cc:	Will Deacon <will.deacon@....com>,
	Catalin Marinas <catalin.marinas@....com>,
	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	Frank Rowand <frowand.list@...il.com>,
	Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org,
	Grant Likely <grant.likely@...aro.org>
Subject: [PATCH] of: document refcount incrementation of of_get_cpu_node()

This function increments refcount.  This is worth noting.

Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
---

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

diff --git a/drivers/of/base.c b/drivers/of/base.c
index b299de2..365e1c02 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -394,7 +394,8 @@ bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
  * before booting secondary cores. This function uses arch_match_cpu_phys_id
  * which can be overridden by architecture specific implementation.
  *
- * Returns a node pointer for the logical cpu if found, else NULL.
+ * Returns a node pointer for the logical cpu with refcount incremented, use
+ * of_node_put() on it when done. Returns NULL if not found.
  */
 struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
 {
-- 
1.9.1

Powered by blists - more mailing lists