lkml.org 
[lkml]   [2005]   [Mar]   [19]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateSat, 19 Mar 2005 14:39:52 +0100
FromAdrian Bunk <>
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 13:11    [W:1.114 / U:0.240 seconds]
©2003-2008 Jasper Spaans