diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2017-06-19 08:44:45 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-15 10:16:16 (GMT) |
commit | 0d6758f74a469ff34e353ddd9bf3229afff7915b (patch) | |
tree | a193b562f310fe7bf0006353b3f5a355e25459bf /drivers/scsi/pcmcia | |
parent | 090661e4073d4eea3f9644f48193d6791fed9b1d (diff) | |
download | linux-0d6758f74a469ff34e353ddd9bf3229afff7915b.tar.xz |
crypto: caam - fix gfp allocation flags (part I)
commit 42cfcafb91dabb0f9d9e08396c39824535948c67 upstream.
Changes in the SW cts (ciphertext stealing) code in
commit 0605c41cc53ca ("crypto: cts - Convert to skcipher")
revealed a problem in the CAAM driver:
when cts(cbc(aes)) is executed and cts runs in SW,
cbc(aes) is offloaded in CAAM; cts encrypts the last block
in atomic context and CAAM incorrectly decides to use GFP_KERNEL
for memory allocation.
Fix this by allowing GFP_KERNEL (sleeping) only when MAY_SLEEP flag is
set, i.e. remove MAY_BACKLOG flag.
We split the fix in two parts - first is sent to -stable, while the
second is not (since there is no known failure case).
Link: http://lkml.kernel.org/g/20170602122446.2427-1-david@sigma-star.at
Reported-by: David Gstir <david@sigma-star.at>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/pcmcia')
0 files changed, 0 insertions, 0 deletions