floppy: fix usercopy direction
authorJann Horn <jannh@google.com>
Tue, 26 Mar 2019 22:03:48 +0000 (23:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:15:46 +0000 (07:15 +0200)
commitd14a5710f801487e149d847247e93cd8f1b8816c
tree077ecb4cda0a7d70cb1ee7725d630b38a13b431e
parent8cef08f889c5f7bada7ea0acc789a5ad87f6d6bd
floppy: fix usercopy direction

commit 52f6f9d74f31078964ca1574f7bb612da7877ac8 upstream.

As sparse points out, these two copy_from_user() should actually be
copy_to_user().

Fixes: 229b53c9bf4e ("take floppy compat ioctls to sodding floppy.c")
Cc: stable@vger.kernel.org
Acked-by: Alexander Popov <alex.popov@linux.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/floppy.c