Re: 2.5.47bk2 + current modutils == broken hotplug

Rusty Russell
2002-11-14T17:38:10Z

In message <3DD3CD08.7080003@pacbell.net> you write:
> Consider two instances of such a device. Hotplug one, the driver
> is loaded, refcount zero since it's not opened. Then rmmod on
> unplug would be appropriate: the hardware is gone.
>
> But instead of unplugging it, plug in a second. Now rmmod is no
> longer an appropriate default policy on unplug, even though the
> module "refcount" is still zero, since the user could still try
> access the other device. (Maybe they were plugging in devices
> until they found the one with the data they were after, and just
> hadn't looked at that the other one yet.)

Hmmm, interesting problem. Perhaps your idea of having drivers hold a
refcount for every device they control makes sense in this case, but
as you point out, it's a significant departure from current policy.

With "rmmod -f" it's not quite reboot time, though.

Anyway, I don't think this is a battle I want to fight 8)

Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.