diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-04-30 06:59:42 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-04-30 06:59:42 +0300 |
commit | b6ea1680d0ac0e45157a819c41b46565f4616186 (patch) | |
tree | 6be0c86fea85e8a419deee7c8933b6d8853e854f | |
parent | 8bac8898fe398ffa3e09075ecea2be511725fb0b (diff) | |
parent | a32f1923c6d6e9e727d00558a15ec0af6639de19 (diff) | |
download | linux-b6ea1680d0ac0e45157a819c41b46565f4616186.tar.xz |
Merge tag 'v6.15-p6' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
"This fixes a regression in scompress"
* tag 'v6.15-p6' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: scompress - increment scomp_scratch_users when already allocated
-rw-r--r-- | crypto/scompress.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/scompress.c b/crypto/scompress.c index 36934c78d127..ffeedcf20b0f 100644 --- a/crypto/scompress.c +++ b/crypto/scompress.c @@ -163,11 +163,10 @@ static int crypto_scomp_init_tfm(struct crypto_tfm *tfm) 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); |