Commit f688979e authored by Herbert Xu's avatar Herbert Xu Committed by Greg Kroah-Hartman
Browse files

crypto: api - Add crypto_clone_tfm



[ Upstream commit 3c3a24cb ]

This patch adds the helper crypto_clone_tfm.  The purpose is to
allocate a tfm object with GFP_ATOMIC.  As we cannot sleep, the
object has to be cloned from an existing tfm object.

This allows code paths that cannot otherwise allocate a crypto_tfm
object to do so.  Once a new tfm has been obtained its key could
then be changed without impacting other users.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: 1465036b ("llc: Improve setsockopt() handling of malformed user input")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e470d423
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment