crypto: skcipher - Count error stats differently
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Feb 2023 10:35:21 +0000 (18:35 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Mar 2023 09:06:42 +0000 (17:06 +0800)
commit1085680bbb7a5235351937bea938c7051b443103
treeb6046378f00649de08c898b838a3aa60281d8cd1
parente2950bf166ef71ed5588437b7ee94f65ceaa6cd0
crypto: skcipher - Count error stats differently

Move all stat code specific to skcipher into the skcipher code.

While we're at it, change the stats so that bytes and counts
are always incremented even in case of error.  This allows the
reference counting to be removed as we can now increment the
counters prior to the operation.

After the operation we simply increase the error count if necessary.
This is safe as errors can only occur synchronously (or rather,
the existing code already ignored asynchronous errors which are
only visible to the callback function).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algapi.c
crypto/crypto_user_stat.c
crypto/skcipher.c
include/crypto/skcipher.h
include/linux/crypto.h