[PATCH] check the return value of __copy_to_user in drivers/pcmcia/ds.c::ds_ioctl and return -EFAULT if it fails

Christoph Hellwig hch at infradead.org
Wed Oct 6 06:43:42 EDT 2004

On Wed, Oct 06, 2004 at 12:21:58AM +0200, Jesper Juhl wrote:
>   CC      drivers/pcmcia/ds.o
> include/asm/uaccess.h: In function `ds_ioctl':
> drivers/pcmcia/ds.c:1049: warning: ignoring return value of `__copy_to_user', declared with attribute warn_unused_result
> Patch adds a check of the return value and returns -EFAULT if 
> __copy_to_user fails.

I think this function should use the non-__ prefix version and remove access_ok

More information about the linux-pcmcia mailing list