diff options
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r-- | drivers/block/floppy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 19d45e6c2b9..f959aad30ca 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3162,7 +3162,12 @@ static inline int raw_cmd_copyout(int cmd, char __user *param, int ret; while (ptr) { - COPYOUT(*ptr); + struct floppy_raw_cmd cmd = *ptr; + cmd.next = NULL; + cmd.kernel_data = NULL; + ret = copy_to_user((void __user *)param, &cmd, sizeof(cmd)); + if (ret) + return -EFAULT; param += sizeof(struct floppy_raw_cmd); if ((ptr->flags & FD_RAW_READ) && ptr->buffer_length) { if (ptr->length >= 0 |