Error with init_module

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

 



Hi,

I am writing a code which invokes the init_module system call. At the system call the program terminates with a segmentation fault and error "Invalid operand: 0000".

The first parameter to init_module is the module name which is a constant, so I guess the problem is with the second parameter which is a pointer to struct module. Following are the values of the elements of struct module:

sizeof_struct = 96
name is not NULL
size = 512
flags = 0
nsyms = 3
ndeps = 0
syms is not NULL
deps is NULL
init is not NULL
cleanup is not NULL
ex_table_start is NULL
ex_table_end is NULL
 
So deps, ex_table_start and ex_table_end  are NULL. Rest all seem to be fine. Also when I do lsmod, the module seems to have loaded with use count 1 and (Initializing) displayed next to it.
 
IS this due to the NULL value of the above 3 parameters ? Also is there a way to debug the code when it enters init_module ?
 
Thanks for the help,
SP



Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

[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