lkml.org 
[lkml]   [2005]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.6.11-mm4: drivers/scsi/arcmsr/arcmsr.c: enormous stack usage
On Wed, Mar 16, 2005 at 04:06:54AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.11-mm3:
>...
> +areca-raid-linux-scsi-driver.patch
>
> Updated version of this driver.
>...

<-- snip -->

...
static int arcmsr_iop_ioctlcmd(PACB pACB, int ioctl_cmd, void *arg)
{
...
uint8_t tmpQbuffer[1032];
...
uint8_t tmpuserbuffer[1032];
...
}
...
<-- snip -->


1kB allocations from the stack aren't a good idea considering that you
might have only a 4kB stack altogether.


Running "make checkstack" after compiling the kernel helps you finding
such problems.


cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [from the cache]
©2003-2011 Jasper Spaans