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
> --- /tmp/linux-2.3.23-clean/drivers/cdrom/cdrom.c	Sun Oct 24 14:41:38 1999
> +++ drivers/cdrom/cdrom.c Sun Oct 24 14:27:17 1999
> @@ -1123,11 +1123,14 @@
> static int dvd_read_disckey (struct cdrom_device_info *cdi, dvd_struct *s)
> {
> int ret;
> - u_char buf[4 + 2048];
> + u_char *buf;
> struct cdrom_generic_command cgc;
> struct cdrom_device_ops *cdo = cdi->ops;
>
> - memset(buf, 0, sizeof (buf));
> + if ((buf = (u_char *) kmalloc(2060, GFP_KERNEL)) == NULL)
> + return -ENOMEM;
> +
> + memset(buf, 0, sizeof(buf));

sizeof(buf) is 4 or 8 after you changed it to be a pointer, which is probably
not what you want.

-
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.044 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site