aboutsummaryrefslogtreecommitdiff
path: root/arch/um/drivers/ubd_kern.c
diff options
context:
space:
mode:
authorArjan van de Ven <[email protected]>2009-12-14 18:00:11 -0800
committerLinus Torvalds <[email protected]>2009-12-15 08:53:25 -0800
commit2886a8bdfa007053b414ab01741a98c18c376a85 (patch)
tree6b3d10c16393da65f271fe7865feb4bae97e7674 /arch/um/drivers/ubd_kern.c
parentfaa7b7ddca14887ac037f585d2fac7ca6c57037e (diff)
floppy: Add an extra bound check on ioctl arguments
gcc is not convinced that the floppy.c ioctl has sufficient bound checks: In function `copy_from_user', inlined from `fd_copyin' at drivers/block/floppy.c:3080, inlined from `fd_ioctl' at drivers/block/floppy.c:3503: arch/x86/include/asm/uaccess_32.h:211: warning: call to `copy_from_user_overflow' declared with attribute warning: copy_from_user buffer size is not provably correct And frankly, as a human I have a hard time proving the same more or less (the size comes from the ioctl argument. humpf. maybe. the code isn't very nice) This patch adds an explicit check to make 100% sure it's safe, better than finding out later that there indeed was a gap. [[email protected]: add WARN_ON()] Signed-off-by: Arjan van de Ven <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'arch/um/drivers/ubd_kern.c')
0 files changed, 0 insertions, 0 deletions