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]
Message-Id: <20181025141853.214051-49-sashal@kernel.org>
Date:   Thu, 25 Oct 2018 10:18:04 -0400
From:   Sasha Levin <sashal@...nel.org>
To:     stable@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Abhilash Kesavan <a.kesavan@...sung.com>,
        Olof Johansson <olof@...om.net>,
        Sasha Levin <sashal@...nel.org>
Subject: [PATCH AUTOSEL 3.18 49/98] drivers: bus: check cci device tree node status

From: Abhilash Kesavan <a.kesavan@...sung.com>

[ Upstream commit 896ddd600ba4a3426aeb11710ae9c28dd7ce68ce ]

The arm-cci driver completes the probe sequence even if the cci node is
marked as disabled. Add a check in the driver to honour the cci status
in the device tree.

Signed-off-by: Abhilash Kesavan <a.kesavan@...sung.com>
Acked-by: Sudeep Holla <sudeep.holla@....com>
Acked-by: Nicolas Pitre <nico@...aro.org>
Tested-by: Sudeep Holla <sudeep.holla@....com>
Tested-by: Kevin Hilman <khilman@...aro.org>
Signed-off-by: Olof Johansson <olof@...om.net>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 drivers/bus/arm-cci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index 7af78df241f2..99cad3ac38f2 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -976,6 +976,9 @@ static int cci_probe(void)
 	if (!np)
 		return -ENODEV;
 
+	if (!of_device_is_available(np))
+		return -ENODEV;
+
 	cci_config = of_match_node(arm_cci_matches, np)->data;
 	if (!cci_config)
 		return -ENODEV;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ