]> www.infradead.org Git - users/dwmw2/linux.git/commit
s390/crypto: Fix return code checking in cbc_paes_crypt()
authorIngo Franzki <ifranzki@linux.ibm.com>
Mon, 27 Aug 2018 12:28:47 +0000 (14:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:30 +0000 (08:39 +0200)
commit8cddf23b74d618d17ee7cb33e6f965a906a7a95a
treee1867a73e3edd378c4725b9992e8ee38861d0a85
parent3e6bba18b8efc0a8f0e0bd844fcc5d87536adca9
s390/crypto: Fix return code checking in cbc_paes_crypt()

commit b81126e01a8c6048249955feea46c8217ebefa91 upstream.

The return code of cpacf_kmc() is less than the number of
bytes to process in case of an error, not greater.
The crypt routines for the other cipher modes already have
this correctly.

Cc: stable@vger.kernel.org # v4.11+
Fixes: 279378430768 ("s390/crypt: Add protected key AES module")
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Acked-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/crypto/paes_s390.c