Re: Stack overflow problem in kernel module

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

 



Thank You Very Much, it fixed the problem :-). 

Regards,
Karthik.


On Sun, 9 Jan 2005 23:06:00 -0800, Greg KH <greg@xxxxxxxxx> wrote:
> 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
> 


-- 
There are things known and things unknown, in between lie the Doors

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