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)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 May 2014 05:54:38 +0000 (07:54 +0200)
commitf76b441b9d5879587f53525933d27b16217ca78c
tree3f55f85352b5067932cda72f64b3fe7806fc31eb
parentd751df64d58a9927b9c4b47aa7cf20204d0ab2f6
floppy: ignore kernel-only members in FDRAWCMD ioctl input

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>
(cherry picked from commit ef87dbe7614341c2e7bfe8d32fcb7028cc97442c)
[wt: be careful in 2.6.32 we still have the ugly macros everywhere]
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/block/floppy.c