diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 4a9a4d12721ae8d5a18f87bf1cff12e98efcfb26..e71589e244fb24c3b97640c38d6acfd25c712d6e 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3791,7 +3791,7 @@ static int compat_getdrvprm(int drive, v.native_format = UDP->native_format; mutex_unlock(&floppy_mutex); - if (copy_from_user(arg, &v, sizeof(struct compat_floppy_drive_params))) + if (copy_to_user(arg, &v, sizeof(struct compat_floppy_drive_params))) return -EFAULT; return 0; } @@ -3827,7 +3827,7 @@ static int compat_getdrvstat(int drive, bool poll, v.bufblocks = UDRS->bufblocks; mutex_unlock(&floppy_mutex); - if (copy_from_user(arg, &v, sizeof(struct compat_floppy_drive_struct))) + if (copy_to_user(arg, &v, sizeof(struct compat_floppy_drive_struct))) return -EFAULT; return 0; Eintr: