summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypto/acompress.c4
-rw-r--r--crypto/deflate.c4
-rw-r--r--include/crypto/internal/acompress.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/crypto/acompress.c b/crypto/acompress.c
index 606d09a7fbfd..b0f9192f6b2e 100644
--- a/crypto/acompress.c
+++ b/crypto/acompress.c
@@ -536,7 +536,7 @@ int acomp_walk_next_dst(struct acomp_walk *walk)
EXPORT_SYMBOL_GPL(acomp_walk_next_dst);
int acomp_walk_virt(struct acomp_walk *__restrict walk,
- struct acomp_req *__restrict req)
+ struct acomp_req *__restrict req, bool atomic)
{
struct scatterlist *src = req->src;
struct scatterlist *dst = req->dst;
@@ -548,7 +548,7 @@ int acomp_walk_virt(struct acomp_walk *__restrict walk,
return -EINVAL;
walk->flags = 0;
- if ((req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP))
+ if ((req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) && !atomic)
walk->flags |= ACOMP_WALK_SLEEP;
if ((req->base.flags & CRYPTO_ACOMP_REQ_SRC_VIRT))
walk->flags |= ACOMP_WALK_SRC_LINEAR;
diff --git a/crypto/deflate.c b/crypto/deflate.c
index 57d7af4dfdfb..0d2b64d96d6e 100644
--- a/crypto/deflate.c
+++ b/crypto/deflate.c
@@ -60,7 +60,7 @@ static int deflate_compress_one(struct acomp_req *req,
struct acomp_walk walk;
int ret;
- ret = acomp_walk_virt(&walk, req);
+ ret = acomp_walk_virt(&walk, req, true);
if (ret)
return ret;
@@ -140,7 +140,7 @@ static int deflate_decompress_one(struct acomp_req *req,
struct acomp_walk walk;
int ret;
- ret = acomp_walk_virt(&walk, req);
+ ret = acomp_walk_virt(&walk, req, true);
if (ret)
return ret;
diff --git a/include/crypto/internal/acompress.h b/include/crypto/internal/acompress.h
index 0f3ad65be2d9..7eda32619024 100644
--- a/include/crypto/internal/acompress.h
+++ b/include/crypto/internal/acompress.h
@@ -208,7 +208,7 @@ void acomp_walk_done_dst(struct acomp_walk *walk, int used);
int acomp_walk_next_src(struct acomp_walk *walk);
int acomp_walk_next_dst(struct acomp_walk *walk);
int acomp_walk_virt(struct acomp_walk *__restrict walk,
- struct acomp_req *__restrict req);
+ struct acomp_req *__restrict req, bool atomic);
static inline bool acomp_walk_more_src(const struct acomp_walk *walk, int cur)
{