aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2018-09-21 09:41:05 +0200
committerGreg Kroah-Hartman2018-09-21 09:41:05 +0200
commit211b100a5ceda9d1856a3f84334f9ca5f680b638 (patch)
tree551ec1760c5037e4ef27c36a56667f500137c392 /drivers/block
parenta38fd7d808e6a9dcc8fac30fc870ccb88ce07221 (diff)
parentd611aaf336b2e8e81f98490eabf7b92889b15319 (diff)
Merge tag 'for-linus-20180920' of git://git.kernel.dk/linux-block
Jens writes: "Storage fixes for 4.19-rc5 - Fix for leaking kernel pointer in floppy ioctl (Andy Whitcroft) - NVMe pull request from Christoph, and a single ANA log page fix (Hannes) - Regression fix for libata qd32 support, where we trigger an illegal active command transition. This fixes a CD-ROM detection issue that was reported, but could also trigger premature completion of the internal tag (me)" * tag 'for-linus-20180920' of git://git.kernel.dk/linux-block: floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl libata: mask swap internal and hardware tag nvme: count all ANA groups for ANA Log page
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/floppy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 48f622728ce6..f2b6f4da1034 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3467,6 +3467,9 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int
(struct floppy_struct **)&outparam);
if (ret)
return ret;
+ memcpy(&inparam.g, outparam,
+ offsetof(struct floppy_struct, name));
+ outparam = &inparam.g;
break;
case FDMSGON:
UDP->flags |= FTD_MSG;