Re: stack overflow + sendmsg

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

 



On Wednesday 26 May 2004 01:38, prasanna wakhare wrote:
> hi,
> do you mean to say the thread has defined any local
> data  structures?which when scheduled causing stack
> overflow.
> there are declared some structure there,
> plz let me know in more details what the reason
> Prasanna

Any function you have that uses a lot of stack space from local 
variables increases the risk of exceeding the limited size of the 
kernel's stack.  Since some structures can be quite large, you need to 
be carefull about allocating space for them on the stack.  e.g. 
function foo below uses a lot more stack space then function bar.

void foo(void) {
	struct sk_buff skb;
	....
}

void bar(void) {
	struct sk_buff *skb
	...
}

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