summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2018-11-29 14:42:22 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2018-12-07 14:15:00 +0800
commitfd4c815bdfb3d37148d5d7a811e85e025f106e6a (patch)
treea56ef3e042c1236ce5f36def0d8a145b96bc691f /crypto
parent69bd3f459030421c05f6cf915e67dde167360e8c (diff)
downloadlinux-crypto-fd4c815bdfb3d37148d5d7a811e85e025f106e6a.tar.gz
linux-crypto-fd4c815bdfb3d37148d5d7a811e85e025f106e6a.zip
crypto: user - Fix invalid stat reporting
Some error count use the wrong name for getting this data. But this had not caused any reporting problem, since all error count are shared in the same union. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/crypto_user_stat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/crypto_user_stat.c b/crypto/crypto_user_stat.c
index 3c14be2f..83812375 100644
--- a/crypto/crypto_user_stat.c
+++ b/crypto/crypto_user_stat.c
@@ -93,7 +93,7 @@ static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg)
rcomp.stat_decompress_cnt = v64;
v64 = atomic64_read(&alg->decompress_tlen);
rcomp.stat_decompress_tlen = v64;
- v64 = atomic64_read(&alg->cipher_err_cnt);
+ v64 = atomic64_read(&alg->compress_err_cnt);
rcomp.stat_compress_err_cnt = v64;
return nla_put(skb, CRYPTOCFGA_STAT_COMPRESS, sizeof(rcomp), &rcomp);
@@ -115,7 +115,7 @@ static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg)
racomp.stat_decompress_cnt = v64;
v64 = atomic64_read(&alg->decompress_tlen);
racomp.stat_decompress_tlen = v64;
- v64 = atomic64_read(&alg->cipher_err_cnt);
+ v64 = atomic64_read(&alg->compress_err_cnt);
racomp.stat_compress_err_cnt = v64;
return nla_put(skb, CRYPTOCFGA_STAT_ACOMP, sizeof(racomp), &racomp);
@@ -222,7 +222,7 @@ static int crypto_report_rng(struct sk_buff *skb, struct crypto_alg *alg)
rrng.stat_generate_tlen = v64;
v64 = atomic64_read(&alg->seed_cnt);
rrng.stat_seed_cnt = v64;
- v64 = atomic64_read(&alg->hash_err_cnt);
+ v64 = atomic64_read(&alg->rng_err_cnt);
rrng.stat_rng_err_cnt = v64;
return nla_put(skb, CRYPTOCFGA_STAT_RNG, sizeof(rrng), &rrng);