summaryrefslogtreecommitdiff
path: root/crypto/crypto_user.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2018-05-02 00:38:52 -0700
committerJohn Johansen <john.johansen@canonical.com>2018-05-02 00:38:52 -0700
commitdb5c6566ee03e097b4b7f7e207189c0906e9d1aa (patch)
treefb78e31032dcca2fcb0e9123cf11be12728f99c5 /crypto/crypto_user.c
parent21864b027d847a6d91903a5ba219770403ba8aad (diff)
parentef734472771a62ae9f901367a40a89382a991917 (diff)
downloadlinux-crypto-db5c6566ee03e097b4b7f7e207189c0906e9d1aa.tar.gz
linux-crypto-db5c6566ee03e097b4b7f7e207189c0906e9d1aa.zip
Merge tag 'v4.17-rc3' into apparmor-next
Linux v4.17-rc3 Merge in v4.17 for LSM updates Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r--crypto/crypto_user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 0dbe2be7..0e89b545 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;
@@ -271,7 +271,7 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
return -ENOENT;
err = -ENOMEM;
- skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
+ skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!skb)
goto drop_alg;
@@ -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);