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: <20120109190321.537038bc@milhouse>
Date:	Mon, 9 Jan 2012 19:03:21 +0100
From:	Michael Büsch <m@...s.ch>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Joerg Roedel <joerg.roedel@....com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Incorrect uses of get_driver()/put_driver()

On Mon, 9 Jan 2012 12:35:09 -0500 (EST)
Alan Stern <stern@...land.harvard.edu> wrote:

> drivers/ssb/main.c:146:               get_driver(&drv->drv);
> drivers/ssb/main.c:153:               put_driver(&drv->drv);
> 
> Michael, these are part of ssb_driver_get() and ssb_driver_put(), used
> in ssb_devices_freeze() and ssb_devices_thaw().  They don't currently
> do anything, but it looks as if they are meant to prevent the driver
> from being unloaded.  Should they be replaced with try_module_get()?  
> Or would it be good enough to call device_attach() in 
> ssb_devices_thaw()?

Hm, It seems that this code is trying to pin the ssb_driver, so that
it doesn't become invalid during the freeze period. So it most likely wants
to protect against module unload and driver unbind here. Not sure
if that actually works, though :/

-- 
Greetings, Michael.
--
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