[PATCHES] pcmcia: update socket registration

Dominik Brodowski linux at brodo.de
Tue Jun 10 21:45:30 BST 2003


On Mon, Jun 09, 2003 at 10:54:01PM +0100, Russell King wrote:
> Something niggles me here - what prevents "driver" becoming an invalid
> pointer between the point when we found the driver and the point where
> we call try_module_get ?  (eg, I unload the module which contained
> "driver" ?)

Yes, we can do the change you suggest. 

However, I'd rather not spend too much care on this: currently cardmgr 
tries to keep an usage count of the modules in userspace; by rmmod'ing 
modules at will you'll desperately break that. In addition to that usage
count my patch increases and decreases the usage count, with the only aim to
avoid pcmcia_unregister_driver being called with usage_count > 0. Proper
module refcounting and locking will come once ds.c is re-worked to use
hotplug. [and my proof-of-concept patches with that regard already do it]
BTW, I'd prefer getting rid of get_pcmcia_driver -- there's only one caller.
And I definitely don't want a put_pcmcia_driver which takes (dev_info_t
*dev_info) as its argument... 

	Dominik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20030610/390dc169/attachment.bin


More information about the linux-pcmcia mailing list