mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04: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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
809778e02c
commit
ce8614a312
6 changed files with 11 additions and 11 deletions
|
|
@ -46,7 +46,7 @@ static int c_show(struct seq_file *m, void *p)
|
|||
seq_printf(m, "driver : %s\n", alg->cra_driver_name);
|
||||
seq_printf(m, "module : %s\n", module_name(alg->cra_module));
|
||||
seq_printf(m, "priority : %d\n", alg->cra_priority);
|
||||
seq_printf(m, "refcnt : %d\n", atomic_read(&alg->cra_refcnt));
|
||||
seq_printf(m, "refcnt : %u\n", refcount_read(&alg->cra_refcnt));
|
||||
seq_printf(m, "selftest : %s\n",
|
||||
(alg->cra_flags & CRYPTO_ALG_TESTED) ?
|
||||
"passed" : "unknown");
|
||||
|
|
|
|||
Loading…
Reference in a new issue