summaryrefslogtreecommitdiffstats
path: root/crypto/crypto_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r--crypto/crypto_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 0dbe2be7f783..5c291eedaa70 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -169,7 +169,7 @@ static int crypto_report_one(struct crypto_alg *alg,
169 ualg->cru_type = 0; 169 ualg->cru_type = 0;
170 ualg->cru_mask = 0; 170 ualg->cru_mask = 0;
171 ualg->cru_flags = alg->cra_flags; 171 ualg->cru_flags = alg->cra_flags;
172 ualg->cru_refcnt = atomic_read(&alg->cra_refcnt); 172 ualg->cru_refcnt = refcount_read(&alg->cra_refcnt);
173 173
174 if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority)) 174 if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority))
175 goto nla_put_failure; 175 goto nla_put_failure;
@@ -387,7 +387,7 @@ static int crypto_del_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
387 goto drop_alg; 387 goto drop_alg;
388 388
389 err = -EBUSY; 389 err = -EBUSY;
390 if (atomic_read(&alg->cra_refcnt) > 2) 390 if (refcount_read(&alg->cra_refcnt) > 2)
391 goto drop_alg; 391 goto drop_alg;
392 392
393 err = crypto_unregister_instance((struct crypto_instance *)alg); 393 err = crypto_unregister_instance((struct crypto_instance *)alg);