]> git.baikalelectronics.ru Git - kernel.git/commit
s390/pkey: fix missing length of protected key on return
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 31 Jan 2020 11:08:31 +0000 (12:08 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 10 Feb 2020 11:49:35 +0000 (12:49 +0100)
commit13e21dd368cd062b5f4a5c87ea5f73c82fc0ea0f
treee78352e7e8662c8847e8b05ab54330acff3f6d25
parent900abd43b6d837ba70928a9ee9599ba3be1d2fb6
s390/pkey: fix missing length of protected key on return

The pkey ioctl call PKEY_SEC2PROTK updates a struct pkey_protkey
on return. The protected key is stored in, the protected key type
is stored in but the len information was not updated. This patch
now fixes this and so the len field gets an update to refrect
the actual size of the protected key value returned.

Fixes: 7b688df1f15f ("s390/zcrypt: move cca misc functions to new code file")
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reported-by: Christian Rund <RUNDC@de.ibm.com>
Suggested-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/crypto/pkey_api.c