crypto: s390 - fix des and des3_ede ctr concurrency issue
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Wed, 22 Jan 2014 12:01:33 +0000 (13:01 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 30 Jan 2014 13:45:14 +0000 (21:45 +0800)
commitee97dc7db4cbda33e4241c2d85b42d1835bc8a35
tree14232912769ade751a61a61984bf1aaf2dc2fb24
parentadc3fcf1552b6e406d172fd9690bbd1395053d13
crypto: s390 - fix des and des3_ede ctr concurrency issue

In s390 des and 3des ctr mode there is one preallocated page
used to speed up the en/decryption. This page is not protected
against concurrent usage and thus there is a potential of data
corruption with multiple threads.

The fix introduces locking/unlocking the ctr page and a slower
fallback solution at concurrency situations.

Cc: stable@vger.kernel.org
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/s390/crypto/des_s390.c