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>] [day] [month] [year] [list]
Message-Id: <ea122702a46f5ce6995480f6966cb8ca90a01719.1427428279.git.baruch@tkos.co.il>
Date:	Fri, 27 Mar 2015 06:51:19 +0300
From:	Baruch Siach <baruch@...s.co.il>
To:	Kishon Vijay Abraham I <kishon@...com>
Cc:	linux-kernel@...r.kernel.org, Baruch Siach <baruch@...s.co.il>
Subject: [PATCH] phy: core: fix registration of built in drivers

Built in PHY drivers probe may run as early as arch_initcall. This is the case
on ARM when device tree is enabled, since of_platform_populate() is called from
customize_machine(). The trouble is that at this stage phy_class is not yet
initialized, and as a result device_add() does not add the newly registered PHY
to the list of class device. This breaks of_phy_simple_xlate().

Move phy_class initialization before arch_initcall to fix this.

Signed-off-by: Baruch Siach <baruch@...s.co.il>
---
 drivers/phy/phy-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index a12d35338313..648c3b179459 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -892,7 +892,7 @@ static int __init phy_core_init(void)
 
 	return 0;
 }
-module_init(phy_core_init);
+postcore_initcall(phy_core_init);
 
 static void __exit phy_core_exit(void)
 {
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ