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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 15 May 2014 07:55:48 +0000 (09:55 +0200)
commit36cdf95db237630373162e20142df4d11efdd543
tree95845c769a7e41d7d52525c40deac00ea885a45c
parent61461fa9182895c6396ee9704d80fe8ff9d1135d
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: Jiri Slaby <jslaby@suse.cz>
drivers/block/floppy.c