Re: PATCH: support for firmwares sizes up to 128000 bytes

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 23 Dec 1998 02:17:11 +0000 (GMT)


> - data = kmalloc(conf->data_size, GFP_KERNEL);
> + data = vmalloc(conf->data_size);
> if (data)
> {
> if(!copy_from_user(data, conf->data, conf->data_size))
> {
> conf->data=data;
> - wandev->setup(wandev,conf);
> - err = 0;
> + err = wandev->setup(wandev,conf);
> }
> else
> err = -ENOBUFS;#

The logic is wrong here. I think it was wrong in the original too. I've
fixed that in the 2.1.132ac1 draft else err = -EFAULT; } else err = -ENOBUFS;
the copy fault is -EFAULT, the data==NULL case isnt covered in the original

and vmalloc bit added

-
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/