lkml.org 
[lkml]   [1999]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how much stack space can I use
Jens Axboe wrote:
> Here's a diff against 2.3.23 that should take care of the above
> stack problems in cdrom.c. Your script does not work for me
> for some reason, so I haven't checked the new results (I'm
> just lazy).
>

The memset looks wrong:
- memset(buf, 0, sizeof (buf));
+ if ((buf = (u_char *) kmalloc(2060, GFP_KERNEL)) == NULL)
+ return -ENOMEM;
+
+ memset(buf, 0, sizeof(buf));
^^^^^^^^^^^
init_cdrom_command(&cgc, buf, sizeof(buf));

I doubt you want to initialize the first 4 bytes...

Manfred

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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.103 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site