corresponding patches to [RFC]

Russell King rmk at arm.linux.org.uk
Wed Jul 9 23:41:00 BST 2003


On Mon, Jul 07, 2003 at 02:47:20PM +0200, Dominik Brodowski wrote:
> On Sun, Jul 06, 2003 at 11:34:29PM +0100, Russell King wrote:
> > I'm also slightly worried about the lifetime of the pcmcia_bus object.
> > Although bus_unregister() makes it disappear from the sysfs tree, any
> > references to that object and any sub-object will cause other code in
> > the kernel to keep a reference to the pcmcia_bus_type, which gets
> > really messy when the module whose storage it was using has long
> > since gone.
> 
> Any module using pcmcia_bus will increase the refcount of ds.ko. Doesn't
> this solve this problem?

The problem I was worried about (which has now been fixed by a patch via
gregkh) is what happens when you have an attribute "in use" holding
a device in memory, which requires its release function in order to free
it.  Up until this patch, it was possible to remove the module in this
state.  When the last reference is dropped, kernel goes oops because
the release function isn't there anymore.

However, I think this has become a non-issue since GregKH merged the
module use counting for device attributes.

-- 
Russell King (rmk at arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html




More information about the linux-pcmcia mailing list