mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 14:31:46 +00:00
crypto: algapi - convert cra_refcnt to refcount_t
Reference counters should use refcount_t rather than atomic_t, since the refcount_t implementation can prevent overflows, reducing the exploitability of reference leak bugs. crypto_alg.cra_refcount is a reference counter with the usual semantics, so switch it over to refcount_t. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
809778e02c
commit
ce8614a312
6 changed files with 11 additions and 11 deletions
|
@ -447,7 +447,7 @@ struct crypto_alg {
|
|||
unsigned int cra_alignmask;
|
||||
|
||||
int cra_priority;
|
||||
atomic_t cra_refcnt;
|
||||
refcount_t cra_refcnt;
|
||||
|
||||
char cra_name[CRYPTO_MAX_ALG_NAME];
|
||||
char cra_driver_name[CRYPTO_MAX_ALG_NAME];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue