Re: Stack overflow problem in kernel module

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

 



On Mon, Jan 10, 2005 at 12:30:46PM +0530, Karthik Subramanian wrote:
> 1. Why is it a bad idea to use huge local arrays in kernel modules?

Because your kernel stack is very small. 4Kb.  If you need a large
array, either make it static (not on the stack) or dynamically allocate
it (with kmalloc.)

Hope this helps,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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