public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.11-mm4: drivers/scsi/arcmsr/arcmsr.c: enormous stack usage
       [not found] <20050316040654.62881834.akpm@osdl.org>
@ 2005-03-19 13:39 ` Adrian Bunk
       [not found]   ` <002c01c52df4$37620cd0$9300a8c0@erich2003>
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2005-03-19 13:39 UTC (permalink / raw)
  To: Andrew Morton, Erich Chen; +Cc: linux-kernel, linux-scsi

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.6.11-mm4: drivers/scsi/arcmsr/arcmsr.c: enormous stack usage
       [not found]   ` <002c01c52df4$37620cd0$9300a8c0@erich2003>
@ 2005-03-22 15:56     ` Adrian Bunk
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-03-22 15:56 UTC (permalink / raw)
  To: erich
  Cc: linux-scsi, Linux Matt Dainty, Linux Kornel Wieliczek,
	Linux James Bottomley, Linux Christoph Hellwig,
	Linux Arjan van de Ven, Linux Andrew Morton

On Mon, Mar 21, 2005 at 04:58:57PM +0800, erich wrote:

> Hi Dear All

Hi,

> I had modify  arcmsr_iop_ioctlcmd data buffer allocations from the stack
> issue.
>...

thanks, but an additional stack issue is still present (it's a bit more 
hidden):
- cmdioctlfld uses 1060 bytes from the stack

> Best Regards
> Erich Chen

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-22 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050316040654.62881834.akpm@osdl.org>
2005-03-19 13:39 ` 2.6.11-mm4: drivers/scsi/arcmsr/arcmsr.c: enormous stack usage Adrian Bunk
     [not found]   ` <002c01c52df4$37620cd0$9300a8c0@erich2003>
2005-03-22 15:56     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox