Re: how much stack space can I use

Manfred Spraul (manfreds@colorfullife.com)
Sun, 24 Oct 1999 14:53:13 +0200


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/