Messages in this thread | | | Date | Sun, 24 Oct 1999 15:02:35 +0200 | From | Philipp Rumpf <> | Subject | Re: 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/
| |