There would be two modes for 'rmmod'. One is the "remove if the
kernel can tell it can't be used" (as described above), suitable
for automation. The other gives the rude end-user failure modes:
"remove this module if it's not in active use", which is all we
have today ... a mode suitable only for developers or sysadmins.
Userland needs to make the policy choice, then tell the kernel
whether to ignore any unopened (but bound) devices.
Highly realistic, IMO. It's just a question of ensuring some data
the kernel already holds (N devices are bound to this driver, even
if none are currently opened) is considered by rmmod. I almost put
together a patch for it at one time. There seems to be a change
in maintainer under way, maybe it'd be worth revisiting this.
- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/