diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-09 21:33:40 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-09 21:33:40 +0800 |
| commit | 5322584385d938773cbb562db64d8423dd5fd026 (patch) | |
| tree | 472e5f9ede85ab1b17fc2b73068bfacf46c40f5c | |
| parent | af7e23c616f523b1c4d1f5f0cd7f9852fa4aa24f (diff) | |
| parent | b7b39df7e710b0068356e4c696af07aa10e2cd3d (diff) | |
| download | net-5322584385d938773cbb562db64d8423dd5fd026.tar.gz | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge crypto tree to pick up scompress and caam fixes. The scompress
fix has a non-trivial resolution as the code in question has moved
over to acompress.
| -rw-r--r-- | crypto/acompress.c | 3 | ||||
| -rw-r--r-- | drivers/crypto/caam/qi.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/crypto/acompress.c b/crypto/acompress.c index 70bc1fd044e446..5807b87bb50812 100644 --- a/crypto/acompress.c +++ b/crypto/acompress.c @@ -483,6 +483,9 @@ void crypto_acomp_free_streams(struct crypto_acomp_streams *s) void (*free_ctx)(void *); int i; + if (!streams) + return; + cancel_work_sync(&s->stream_work); free_ctx = s->free_ctx; diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 7701d00bcb3ac5..b6e7c0b29d4e6c 100644 --- a/drivers/crypto/caam/qi.c +++ b/drivers/crypto/caam/qi.c @@ -122,12 +122,12 @@ int caam_qi_enqueue(struct device *qidev, struct caam_drv_req *req) qm_fd_addr_set64(&fd, addr); do { + refcount_inc(&req->drv_ctx->refcnt); ret = qman_enqueue(req->drv_ctx->req_fq, &fd); - if (likely(!ret)) { - refcount_inc(&req->drv_ctx->refcnt); + if (likely(!ret)) return 0; - } + refcount_dec(&req->drv_ctx->refcnt); if (ret != -EBUSY) break; num_retries++; |
