Re: __init & __exit

Petr Vandrovec Ing. VTEI (VANDROVE@vc.cvut.cz)
Tue, 10 Aug 1999 16:09:33 MET-1


On 10 Aug 99 at 9:50, Horst von Brand wrote:
> > for hotpluggable devices we then cannot
> > release __init section in most cases (as
> > device initialization lives in this section
> > in most cases).
> It's probably easier to get the module in two pieces: foo-init and
> foo-proper. foo-init loads foo-proper (or is loaded by a dependency,
> whatever), initializes it and goes away. Or use the kernel __init idea: Use
> it, loose it.
It requires some cooperation from modutils - it knows which module depends
on which, so you cannot release foo-init. And it has no idea about __init -
it could eventually lead to call into released memory on another module
insmod. And, unfortunately, you cannot use this aproach for objects build
into kernel - these __init sections are stored only in kernel image, nowhere
else.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/