summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2017-09-12 14:00:23 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-09-25 07:25:52 (GMT)
commit58468d12e2a277a1666d19e616232c8ba7f7e46e (patch)
treed06be3a5247fe15f0199580d412780b6d6caac2e /drivers/crypto
parentbeea8df2c84e1e8c57b1cb8ee280ab62bf847d57 (diff)
downloadlinux-58468d12e2a277a1666d19e616232c8ba7f7e46e.tar.xz
crypto: caam/qi2 - fix gfp allocation flags (part II)
Decide whether to use GFP_ATOMIC / GFP_KERNEL solely based on MAY_SLEEP flag, i.e. remove MAY_BACKLOG flag from the equation. Fixes: 4aef966f7e8a ("crypto: caam/qi2 - add ablkcipher algorithms") Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/caamalg_qi2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index 9e2170e..f031634 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -1541,8 +1541,7 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request
struct dpaa2_fl_entry *out_fle = &req_ctx->fd_flt[0];
struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher);
struct device *dev = ctx->dev;
- gfp_t flags = (req->base.flags & (CRYPTO_TFM_REQ_MAY_BACKLOG |
- CRYPTO_TFM_REQ_MAY_SLEEP)) ?
+ gfp_t flags = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
GFP_KERNEL : GFP_ATOMIC;
int src_nents, mapped_src_nents, dst_nents = 0, mapped_dst_nents = 0;
struct ablkcipher_edesc *edesc;
@@ -1696,8 +1695,7 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc(
struct dpaa2_fl_entry *out_fle = &req_ctx->fd_flt[0];
struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher);
struct device *dev = ctx->dev;
- gfp_t flags = (req->base.flags & (CRYPTO_TFM_REQ_MAY_BACKLOG |
- CRYPTO_TFM_REQ_MAY_SLEEP)) ?
+ gfp_t flags = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
GFP_KERNEL : GFP_ATOMIC;
int src_nents, mapped_src_nents, dst_nents, mapped_dst_nents;
struct ablkcipher_edesc *edesc;