crypto: algapi - convert cra_refcnt to refcount_t
authorEric Biggers <ebiggers@google.com>
Fri, 29 Dec 2017 16:00:46 +0000 (10:00 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 5 Jan 2018 07:43:09 +0000 (18:43 +1100)
commitce8614a312ef750bb60677bb13680cb27d1c284b
tree842f01d86dc235bcd80c8544969d9fffeaec30c5
parent809778e02cd45d0625439fee67688f655627bb3c
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>
crypto/algapi.c
crypto/api.c
crypto/crypto_user.c
crypto/internal.h
crypto/proc.c
include/linux/crypto.h