Skip to content

Commit b6ea168

Browse files
committed
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
2 parents 8bac889 + a32f192 commit b6ea168

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crypto/scompress.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,10 @@ static int crypto_scomp_init_tfm(struct crypto_tfm *tfm)
163163
if (ret)
164164
goto unlock;
165165
}
166-
if (!scomp_scratch_users) {
166+
if (!scomp_scratch_users++) {
167167
ret = crypto_scomp_alloc_scratches();
168168
if (ret)
169-
goto unlock;
170-
scomp_scratch_users++;
169+
scomp_scratch_users--;
171170
}
172171
unlock:
173172
mutex_unlock(&scomp_lock);

0 commit comments

Comments
 (0)