Re: __initdata query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,

>> static int noinline init_post(void)
>> {
>>         free_initmem();    <--------
> ... snip ...
>
>   but that's releasing all the "init" marked content at boot time.
> the same thing has to happen upon each module load.  i still don't see
> how that affects what happens at module load time.
>
>   i'm still convinced this has to be happening in kernel/module.c
> somewhere, i just haven't looked closely enough to see where.

sys_init_module() calls load_mod().

load_mod() allocates a region for module->module_init (grep for
mod->module_init = ptr and see the context) and copies the section of
the ELF file into this region (grep dest = mod->module_init and see the
context).

sys_init_module() calls the init function of the module (grep for ret =
mod->init()) and at the end frees mod->module_init (grep for
module_free(mod, mod->module_init)).

	Hannes

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux