On Thu, Jan 21, 2010 at 07:00:11PM +0100, Frank Batschulat (Home) wrote:
> Hiya,
>
> from the code the zcons module is supposed to be unloadable.
>
>     314 _fini(void)
>     315 {
>     316       int err;
>     317
>     318       if ((err = mod_remove(&modlinkage)) != 0) {
>     319               return (err);
>     320       }
>     321
>     322       ddi_soft_state_fini(&zc_soft_state);
>     323       return (0);
>     324 }
>
> however once it is loaded, and no zlogin, no zoneadmd running etc.
> a modunload fails with EBUSY.
>
> osoldev.batschul./tank/stuff/sw/isos.=> pfexec zlogin -C zone2
> [Connected to zone 'zone2' console]
> ~.
> [Connection to zone 'zone2' console closed]
>
> osoldev.batschul./tank/stuff/sw/isos.=> modinfo | grep zcons
> 276 fffffffff86f0000   1ad0   0   1  zcons (Zone console driver)
>
> osoldev.batschul./tank/stuff/sw/isos.=> pfexec modunload -i 276
> can't unload the module: Device busy
>
> is there an obvious, wellknown explanation for this fact perhaps ?
> just thought to ask before wasting time...
>

well, the module is indeed unloadable:
---8<---
edp{ro...@mcescher$ modinfo | grep zcons
edp{ro...@mcescher$ modload -p drv/zcons
edp{ro...@mcescher$ modinfo | grep zcons
301 fffffffff880a5b0   1ad0 164   1  zcons (Zone console driver)
edp{ro...@mcescher$ modunload -i 301
edp{ro...@mcescher$ modinfo | grep zcons
edp{ro...@mcescher$
---8<---

i'm guessing that there something about the way that instances of zcons
are instantiated (via libdevice`devctl_*() interfaces) that causes the
driver to be unloadable even after all known instances have been torn
down.  afaik, the libdevice devctl interfaces are not really heavily
used for real device management.  i think they are mostly used for
testing.  so i wouldn't be shocked if there were bugs lurking there...

ed
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to