Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Merge crypto tree to pick up the scompress scratch refcount fix.  The
merge resolution is slightly non-trivial as the context has shifted.
This commit is contained in:
Herbert Xu 2025-04-25 10:37:30 +08:00
commit 3715cb9863
1 changed files with 2 additions and 3 deletions

View File

@ -128,11 +128,10 @@ static int crypto_scomp_init_tfm(struct crypto_tfm *tfm)
ret = crypto_acomp_alloc_streams(&alg->streams);
if (ret)
goto unlock;
if (!scomp_scratch_users) {
if (!scomp_scratch_users++) {
ret = crypto_scomp_alloc_scratches();
if (ret)
goto unlock;
scomp_scratch_users++;
scomp_scratch_users--;
}
unlock:
mutex_unlock(&scomp_lock);