Commit b6ea1680 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 8bac8898 a32f1923
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);