]> git.baikalelectronics.ru Git - kernel.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)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 4 Sep 2018 08:58:17 +0000 (10:58 +0200)
commitce1a5b0e27067aee520c1d1c2504db3ccecabe31
tree580b36a511e7c5dc86917aef31369d158f5203b2
parentef986b441d843a813542c4091bb29cf3bfe2dfb3
s390/crypto: Fix return code checking in cbc_paes_crypt()

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: 99d057123617 ("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>
arch/s390/crypto/paes_s390.c