Commit 93bbca27 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull crypto fixes from Herbert Xu:

 - NULL dereference in octeontx

 - PM reference imbalance in ks-sa

 - deadlock in crypto manager

 - memory leak in drbg

 - missing socket limit check on receive SG list size in algif_skcipher

 - typos in caam

 - warnings in ccp and hisilicon

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: drbg - always try to free Jitter RNG instance
  crypto: marvell/octeontx - Fix a potential NULL dereference
  crypto: algboss - don't wait during notifier callback
  crypto: caam - fix typos
  crypto: ccp - Fix sparse warnings in sev-dev
  crypto: hisilicon - Cap block size at 2^31
  crypto: algif_skcipher - Cap recv SG list at ctx->used
  hwrng: ks-sa - Fix runtime PM imbalance on error
parents 64677779 819966c0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -178,8 +178,6 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
	if (IS_ERR(thread))
		goto err_put_larval;

	wait_for_completion_interruptible(&larval->completion);

	return NOTIFY_STOP;

err_put_larval:
+1 −5
Original line number Diff line number Diff line
@@ -74,14 +74,10 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
		return PTR_ERR(areq);

	/* convert iovecs of output buffers into RX SGL */
	err = af_alg_get_rsgl(sk, msg, flags, areq, -1, &len);
	err = af_alg_get_rsgl(sk, msg, flags, areq, ctx->used, &len);
	if (err)
		goto free;

	/* Process only as much RX buffers for which we have TX data */
	if (len > ctx->used)
		len = ctx->used;

	/*
	 * If more buffers are to be expected to be processed, process only
	 * full block size buffers.
+4 −2
Original line number Diff line number Diff line
@@ -1631,9 +1631,11 @@ static int drbg_uninstantiate(struct drbg_state *drbg)
	if (drbg->random_ready.func) {
		del_random_ready_callback(&drbg->random_ready);
		cancel_work_sync(&drbg->seed_work);
	}

	if (!IS_ERR_OR_NULL(drbg->jent))
		crypto_free_rng(drbg->jent);
	drbg->jent = NULL;
	}

	if (drbg->d_ops)
		drbg->d_ops->crypto_fini(drbg);
+1 −0
Original line number Diff line number Diff line
@@ -244,6 +244,7 @@ static int ks_sa_rng_probe(struct platform_device *pdev)
	ret = pm_runtime_get_sync(dev);
	if (ret < 0) {
		dev_err(dev, "Failed to enable SA power-domain\n");
		pm_runtime_put_noidle(dev);
		pm_runtime_disable(dev);
		return ret;
	}
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ config CRYPTO_DEV_FSL_CAAM_RNG_API
	select HW_RANDOM
	help
	  Selecting this will register the SEC4 hardware rng to
	  the hw_random API for suppying the kernel entropy pool.
	  the hw_random API for supplying the kernel entropy pool.

endif # CRYPTO_DEV_FSL_CAAM_JR

Loading