Commit eeddbe68 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 8fb1e910 f7e80983
...@@ -1449,7 +1449,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -1449,7 +1449,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
if (!reqcnt) if (!reqcnt)
return -ENOMEM; return -ENOMEM;
zcrypt_perdev_reqcnt(reqcnt, AP_DEVICES); 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; rc = -EFAULT;
kfree(reqcnt); kfree(reqcnt);
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment