floppy: ignore kernel-only members in FDRAWCMD ioctl input
authorMatthew Daley <mattd@bugfuzz.com>
Mon, 28 Apr 2014 07:05:20 +0000 (19:05 +1200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 May 2014 11:59:40 +0000 (13:59 +0200)
commit21506304588afab20b2d52aaa56b70e85aca6386
treeb54ddcabf5be8cfa8b39bd7856f8c00f2bb412e9
parentabb5100737bba3f82b5514350fea89ca361ac66c
floppy: ignore kernel-only members in FDRAWCMD ioctl input

commit ef87dbe7614341c2e7bfe8d32fcb7028cc97442c upstream.

Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.

Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/floppy.c