aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-09-26 11:01:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-09-26 11:01:18 -0700
commiteeddbe6841cde5524b0b1d01f6e060be564453bf (patch)
tree4a7f98dd390fc7ffa926b111cd471bd523f8e1ec /drivers/s390
parentMerge branch 'akpm' (patches from Andrew) (diff)
parents390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl (diff)
downloadlinux-dev-eeddbe6841cde5524b0b1d01f6e060be564453bf.tar.xz
linux-dev-eeddbe6841cde5524b0b1d01f6e060be564453bf.zip
Merge tag 's390-5.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fix from Vasily Gorbik: "Fix truncated ZCRYPT_PERDEV_REQCNT ioctl result. Copy entire reqcnt list" * tag 's390-5.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/crypto/zcrypt_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c
index 4dbbfd88262c..f314936b5462 100644
--- a/drivers/s390/crypto/zcrypt_api.c
+++ b/drivers/s390/crypto/zcrypt_api.c
@@ -1449,7 +1449,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
if (!reqcnt)
return -ENOMEM;
zcrypt_perdev_reqcnt(reqcnt, AP_DEVICES);
- if (copy_to_user((int __user *) arg, reqcnt, sizeof(reqcnt)))
+ if (copy_to_user((int __user *) arg, reqcnt,
+ sizeof(u32) * AP_DEVICES))
rc = -EFAULT;
kfree(reqcnt);
return rc;