Preventing module->init from being freed

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

 



Hi,

Linux has this feature where module->init() is freed for some drivers
once insmod modprobe finishes. I want to prevent this from happening.
For this I ifed out the following lines from the code for my
particular module from module.c:-

if  !(MODULE_IS_MINE())
{
               unwind_remove_table(mod->unwind_info, 1);
                printk ("Freeing for module %s.\n", mod->name);
                module_free(mod, mod->module_init);
                mod->module_init = NULL;
                mod->init_size = 0;
                mod->init_text_size = 0;
}

After I do this, the mod->init of my code now points to the next
module which is loaded during system boot. Does anyone have any ideas
how do I go about this i.e. keep my mod->init intact?

Regards,
Asim

--
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