On Fri, 18 Jul 2003, David Brownell wrote:

> Martin Diehl wrote:
> > On Fri, 18 Jul 2003, Oliver Neukum wrote:
> > 
> >>We cannot prevent people from unplugging devices, which has the same
> >>consequences. So why would we make provisions to keep root from doing
> >>one more foolish thing?
> > 
> > Because - according to lsmod - the hcd is unused?
> 
> That seems to be how the network drivers work lately too:
> their use counts don't go up with "ifconfig NAME up", like
> they have previously done.  It's not clear to me if that's
> a temporary flaw or a long-term change.

Right, this is what triggered the related SET_MODULE_OWNER thread on lkml.
Davem pointed out the network layer should be safe now or needs fixing if 
not.

> That is, the module refcount shown by "lsmod" doesn't seem
> to reflect usage other than "some other module depends on
> this one" ... and honestly, that makes a lot of sense to me.
> There are different kinds of usage, and it's been trouble
> that "rmmod" has only had a one-size-fits-all model.

Ok, as I said in the other thread, the module refcount (called "Used" by 
lsmod) might either reflect the fact the module must not get removed (or 
it is expected to oops otherwise) or the fact there is some general 
dependance on it, which implies it shall not get removed as a consequence.

> For example, hotplug can't remove driver modules because
> the "lsmod" notion of "usage" is much too weak.
> 
> There should certainly be a "safe rmmod" mode that takes
> into account things like "that driver is bound to that
> hardware, even if the driver hasn't been opened yet, so
> don't rmmod it".  And such a mode could also handle stuff
> like "that hcd is actually in use".

Sounds good to me. But IMHO this would be 2.7 stuff. So the question 
remains whether one wants to break user expectations wrt. lsmod without 
replacement for now? For usb it's not a big deal because nothing has 
changed compared to 2.4. Network might be different...

> Of course, the scsi/block/... hotplug issues really should
> get resolved before 2.6.0 finalizes; progress has been slow.

Sure. Greg gave some pointer to pending linux-scsi stuff so maybe it's 
already done there (haven't tried).

Martin



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to