mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
crypto: iaa - Test the correct request flag
Test the correct flags for the MAY_SLEEP bit.
Fixes: 2ec6761df8 ("crypto: iaa - Add support for deflate-iaa compression algorithm")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -1537,7 +1537,7 @@ static int iaa_comp_acompress(struct acomp_req *req)
|
||||
iaa_wq = idxd_wq_get_private(wq);
|
||||
|
||||
if (!req->dst) {
|
||||
gfp_t flags = req->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC;
|
||||
gfp_t flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC;
|
||||
|
||||
/* incompressible data will always be < 2 * slen */
|
||||
req->dlen = 2 * req->slen;
|
||||
@@ -1619,7 +1619,7 @@ out:
|
||||
|
||||
static int iaa_comp_adecompress_alloc_dest(struct acomp_req *req)
|
||||
{
|
||||
gfp_t flags = req->flags & CRYPTO_TFM_REQ_MAY_SLEEP ?
|
||||
gfp_t flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ?
|
||||
GFP_KERNEL : GFP_ATOMIC;
|
||||
struct crypto_tfm *tfm = req->base.tfm;
|
||||
dma_addr_t src_addr, dst_addr;
|
||||
|
||||
Reference in New Issue
Block a user