summaryrefslogtreecommitdiff
path: root/crypto/crypto_user.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2018-02-21 08:21:41 -0800
committerJames Morris <jmorris@namei.org>2018-02-21 08:21:41 -0800
commit45ce5d915020b8c76238e123748e0eb6e9ddd6ad (patch)
tree916682ca7617ad686d2f8f9cac41ec4e9c432b00 /crypto/crypto_user.c
parent4a06f454768a7e11e8f10b900b450786546cbba1 (diff)
parent17a3638239bb39acce5f03e779c69bc0e4a5c736 (diff)
downloadlinux-crypto-45ce5d915020b8c76238e123748e0eb6e9ddd6ad.tar.gz
linux-crypto-45ce5d915020b8c76238e123748e0eb6e9ddd6ad.zip
Merge tag 'v4.16-rc2' into next-general
Sync to Linux 4.16-rc2 for developers to work against.
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 0dbe2be7..5c291eed 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -169,7 +169,7 @@ static int crypto_report_one(struct crypto_alg *alg,
ualg->cru_type = 0;
ualg->cru_mask = 0;
ualg->cru_flags = alg->cra_flags;
- ualg->cru_refcnt = atomic_read(&alg->cra_refcnt);
+ ualg->cru_refcnt = refcount_read(&alg->cra_refcnt);
if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority))
goto nla_put_failure;
@@ -387,7 +387,7 @@ static int crypto_del_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
goto drop_alg;
err = -EBUSY;
- if (atomic_read(&alg->cra_refcnt) > 2)
+ if (refcount_read(&alg->cra_refcnt) > 2)
goto drop_alg;
err = crypto_unregister_instance((struct crypto_instance *)alg);