crypto: s390 - fix concurrency issue in aes-ctr mode
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Thu, 16 Jan 2014 15:01:11 +0000 (16:01 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 30 Jan 2014 13:45:08 +0000 (21:45 +0800)
The aes-ctr mode uses one preallocated page without any concurrency
protection. When multiple threads run aes-ctr encryption or decryption
this can lead to data corruption.

The patch introduces locking for the page and a fallback solution with
slower en/decryption performance in 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/aes_s390.c

Simple merge