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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 May 2019 16:17:11 +0530
From:   Puneet Saxena <puneets@...dia.com>
To:     <robh+dt@...nel.org>, <pantelis.antoniou@...sulko.com>,
        <frowand.list@...il.com>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     <treding@...dia.com>, <vdumpa@...dia.com>, <snikam@...dia.com>,
        <jonathanh@...dia.com>, Puneet Saxena <puneets@...dia.com>
Subject: [PATCH V2] of: reserved-memory: ignore disabled memory-region nodes

From: Krishna Reddy <vdumpa@...dia.com>

Ignore disabled nodes in the memory-region 
nodes list and continue to initialize the rest 
of enabled nodes.

Check if the "reserved-memory" node is available
and if it's not available, return 0 to ignore the 
"reserved-memory" node and continue parsing with 
next node in memory-region nodes list.

Signed-off-by: Krishna Reddy <vdumpa@...dia.com>
Signed-off-by: Puneet Saxena <puneets@...dia.com>
---
v2:
* Fixed typo in commit message.
* Used "of_device_is_available" to check "reserved-memory"
  nodes are disabled/enabled.

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 1977ee0adcb1..b0b7a0c4431d 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -322,6 +322,9 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
 	if (!target)
 		return -ENODEV;
 
+	if (!of_device_is_available(target))
+		return 0;
+
 	rmem = __find_rmem(target);
 	of_node_put(target);
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ