summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/cavium
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-09-05 15:18:43 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-09-14 08:08:53 +0200
commita788848116454d753b13a4888e0e31ada3c4d393 (patch)
treea1578d1f658cb0f7a69cdf86f40321325c936881 /drivers/crypto/cavium
parentcrc-t10dif: crc_t10dif_mutex can be static (diff)
downloadlinux-a788848116454d753b13a4888e0e31ada3c4d393.tar.xz
linux-a788848116454d753b13a4888e0e31ada3c4d393.zip
crypto: aesni - don't use GFP_ATOMIC allocation if the request doesn't cross a page in gcm
This patch fixes gcmaes_crypt_by_sg so that it won't use memory allocation if the data doesn't cross a page boundary. Authenticated encryption may be used by dm-crypt. If the encryption or decryption fails, it would result in I/O error and filesystem corruption. The function gcmaes_crypt_by_sg is using GFP_ATOMIC allocation that can fail anytime. This patch fixes the logic so that it won't attempt the failing allocation if the data doesn't cross a page boundary. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/cavium')
0 files changed, 0 insertions, 0 deletions