s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 21 Sep 2020 10:48:36 +0000 (12:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 15:36:35 +0000 (17:36 +0200)
commit4545633b037b935cf3ae227b31102d48eebf324f
tree70ee9505e59f3a729cdb7d2a2eaa7594d72fe3a8
parent862f8bb32f4ff2bfab1b45a463483d6822e6d27c
s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl

commit f7e80983f0cf470bb82036e73bff4d5a7daf8fc2 upstream.

reqcnt is an u32 pointer but we do copy sizeof(reqcnt) which is the
size of the pointer. This means we only copy 8 byte. Let us copy
the full monty.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Harald Freudenberger <freude@linux.ibm.com>
Cc: stable@vger.kernel.org
Fixes: af4a72276d49 ("s390/zcrypt: Support up to 256 crypto adapters.")
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/crypto/zcrypt_api.c