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]
Date:	Sun, 20 Mar 2016 18:08:30 +0100
From:	Jann Horn <jann@...jh.net>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Sudip Mukherjee <sudip@...torindia.org>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] drivers: fix link order

Since commit e7223f186033 ("ppdev: use new parport device model"),
my machine panics on boot, caused by the BUG_ON(!drv->bus->p) in
drivers/base/driver.c, called via
ppdev_init() -> parport_register_driver().

The problem is that parport_bus_init(), which initializes
parport_bus_type.p, is only called in an __init method in
drivers/parport/procfs.c, which has not been called yet at the time
ppdev_init(), an __init method in drivers/char/ppdev.c, is called
if the latter is compiled into the kernel (and not a module).

Let's hope this change doesn't break any other stuff? It
works for me.

Signed-off-by: Jann Horn <jann@...jh.net>
---
 drivers/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 8f5d076..68bc38f 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -45,6 +45,9 @@ obj-$(CONFIG_REGULATOR)		+= regulator/
 # reset controllers early, since gpu drivers might rely on them to initialize
 obj-$(CONFIG_RESET_CONTROLLER)	+= reset/
 
+# parport/ before char/ because ppdev_init() depends on parport_bus_init()
+obj-$(CONFIG_PARPORT)		+= parport/
+
 # tty/ comes before char/ so that the VT console is the boot-time
 # default.
 obj-y				+= tty/
@@ -62,7 +65,6 @@ obj-$(CONFIG_CONNECTOR)		+= connector/
 obj-$(CONFIG_FB_I810)           += video/fbdev/i810/
 obj-$(CONFIG_FB_INTEL)          += video/fbdev/intelfb/
 
-obj-$(CONFIG_PARPORT)		+= parport/
 obj-$(CONFIG_NVM)		+= lightnvm/
 obj-y				+= base/ block/ misc/ mfd/ nfc/
 obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ