diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2023-04-13 09:24:15 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-04-20 13:20:04 +0300 |
commit | ae131f4970f0778f35ed06aeb15bde2fbc1d9619 (patch) | |
tree | 32129d0609ff52d6742628db8f284e33274c95a7 /include/linux/crypto.h | |
parent | 94330fbe082acfd7ac9f2a348933944ba78b14dc (diff) | |
download | linux-ae131f4970f0778f35ed06aeb15bde2fbc1d9619.tar.xz |
crypto: api - Add crypto_tfm_get
Add a crypto_tfm_get interface to allow tfm objects to be shared.
They can still be freed in the usual way.
This should only be done with tfm objects with no keys. You must
also not modify the tfm flags in any way once it becomes shared.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r-- | include/linux/crypto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index fdfa3e8eda43..fa310ac1db59 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -419,6 +419,7 @@ int crypto_has_alg(const char *name, u32 type, u32 mask); */ struct crypto_tfm { + refcount_t refcnt; u32 crt_flags; |