Greetings,
we load a stack of kernel modules, say m1, m2, m3, and each module mX
calls into module m(X-1). But only m3 is accessed from user space (as a
socket module), and m1 is a hardware device driver. Thus, m2 is only
called from m3, allocates some memory, and eventually calls into m1
where additional resources are allocated.
Nevertheless, we have situations where we can unload m3, but m2 can not
be unloaded. I noticed that the _fini() function of m2 is not called
upon modunload invocation, but EBUSY is returned before.
Which mechanism decides that m2 should be busy, although this actually
is not the case (at least, should not be)? The calls from m3 into m2 are
not seen by the kernel, how could (and why should) it decide that m2 is
still busy?
Here's how we link m2:
static struct modldrv modldrv =
{
&mod_miscops,
MBOX_INFO, /* a string */
NULL
};
static struct modlinkage modlinkage =
{
MODREV_1, /* MODREV_1 indicated by manl */
(void *)&modldrv,
NULL /* termination of list of linkage structures */
};
thanks, Joachim
--
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code