diff options
| author | Ingo Molnar <mingo@kernel.org> | 2016-02-22 10:26:05 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-02-22 10:26:05 +0300 |
| commit | ab876728a91d89e93e4928895529cd5bb4dff6e4 (patch) | |
| tree | 3aa7603c289f79a570cf15e4019b1acb9459e608 /crypto/crypto_user.c | |
| parent | 35575e0e8ba633fc8276509a21f89b599b4f9006 (diff) | |
| parent | 81f70ba233d5f660e1ea5fe23260ee323af5d53a (diff) | |
| download | linux-ab876728a91d89e93e4928895529cd5bb4dff6e4.tar.xz | |
Merge tag 'v4.5-rc5' into efi/core, before queueing up new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 237f3795cfaa..43fe85f20d57 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, |
