Re: randconfig build error in next-20131125, in drivers/video/kyro

From: Geert Uytterhoeven
Date: Mon Nov 25 2013 - 15:46:13 EST


On Mon, Nov 25, 2013 at 8:49 PM, Jim Davis <jim.epost@xxxxxxxxx> wrote:
> /home/jim/linux/arch/x86/include/asm/uaccess.h: In function âkyrofb_ioctlâ:
> /home/jim/linux/arch/x86/include/asm/uaccess.h:633: error: call to
> âcopy_to_user_overflowâ declared with attribute error: copy_to_user()
> buffer size is too small

Cool!

case KYRO_IOCTL_UVSTRIDE:
if (copy_to_user(argp, &deviceInfo.ulOverlayUVStride,
sizeof(unsigned long)))

ulOverlayUVStride is u32, while unsigned long is 8 bytes on 64 bit.

I guess it should use "sizeof(u32)", or better
"sizeof(deviceInfo.ulOverlayUVStride)"
instead.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/