diff options
author | Dave Airlie <airlied@redhat.com> | 2016-03-14 09:42:34 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-03-14 09:46:02 +1000 |
commit | 7d9f829829af4f2fa95bff8e46847b198726d8f9 (patch) | |
tree | 0a5824f6fef63ea2be36406768e8cfe3e6c2457e /crypto/crypto_user.c | |
parent | 5469409fb50899162e2f59df6cc5750b0dbde9ca (diff) | |
parent | 5da64d0814134dc3542fb314a66dcdf74e8553bd (diff) | |
download | linux-crypto-7d9f829829af4f2fa95bff8e46847b198726d8f9.tar.gz linux-crypto-7d9f829829af4f2fa95bff8e46847b198726d8f9.zip |
Merge drm-fixes into drm-next.
Nouveau wanted this to avoid some worse conflicts when I merge that.
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r-- | crypto/crypto_user.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index 237f3795..43fe85f2 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -499,6 +499,7 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) if (link->dump == NULL) return -EINVAL; + down_read(&crypto_alg_sem); list_for_each_entry(alg, &crypto_alg_list, cra_list) dump_alloc += CRYPTO_REPORT_MAXSIZE; @@ -508,8 +509,11 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) .done = link->done, .min_dump_alloc = dump_alloc, }; - return netlink_dump_start(crypto_nlsk, skb, nlh, &c); + err = netlink_dump_start(crypto_nlsk, skb, nlh, &c); } + up_read(&crypto_alg_sem); + + return err; } err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, CRYPTOCFGA_MAX, |