RE: array declaration inside init function causing kernel panic

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

 



Hi Yogeshwar,

The reason the panic disappeared is because a "static" object cannot live on
the stack. It will be stored in the global data area.
A static local is really like a global, the difference is scope.

> Can one dump more information using some command on a .ko object ?

I think the binary utility 'readelf' can help you there...

Also, I seem to recall the last time I recompiled my Olimex AT91SAM9 kernel
that menuconfig had an option to vary the stack size for processes - IIRC,
not sure though.

Best Regards,
Kris 

-----Original Message-----
From: kernelnewbies-bounce@xxxxxxxxxxxx
[mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of yogeshwar sonawane
Sent: Monday, 9 March 2009 9:06 PM
To: kernelnewbies
Subject: Re: array declaration inside init function causing kernel panic

Hi,

Continuing my discussion, i tried one more thing.

I changed my array declaration from unsigned int array[] to static
unsigned int array[].
Then the kernel panic has disappeared. Now things are working fine.

For ELF file format, one is aware of the different section like code,bss
etc....
Similarly, what are the sections for driver module ?

Can one dump more information using some command on a .ko object ?
(like in my case, where array is placed ? in data or stack ?)

TIA,
Yogeshwar


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