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:	Tue, 12 Apr 2016 20:56:10 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] parport: use subsys_initcall

The drivers which depends on parport may sometimes try to iniitialize
and register with parport bus even before parport has actually
registered with the device layer.
The simplest solution is to mark the init function as subsys_initcall()
and load the parport before the other drivers loads.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@...ethink.co.uk>
---

Linus suggested to only mark parport_bus_init() as subsys_initcall()
but since we are supporting both the device model code and the old code
so to load parport properly we should have parport_default_proc_register()
as subsys_initcall(). After we have removed all the old code then we can
have parport_bus_init().

This has been tested in the same build environment and using same config
which 0-day report was containing for the bug report of ppdev. And also
tested using latest char-misc/testing.

 drivers/parport/procfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index c776333..74ed3e4 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -617,5 +617,5 @@ static void __exit parport_default_proc_unregister (void)
 }
 #endif
 
-module_init(parport_default_proc_register)
+subsys_initcall(parport_default_proc_register)
 module_exit(parport_default_proc_unregister)
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ