diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-03-14 14:33:17 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-03-14 14:33:17 +0800 |
commit | 405b4c1452cb59ce07632a60d3e3152ab9243ae6 (patch) | |
tree | 68efc4424ee51666fc0153d406f3b05dc43ff139 /crypto | |
parent | 4375255906557444b034ca1b24603b29945276cf (diff) | |
parent | 82211c838b558293e48c8fcd816f6609ebc7e4b3 (diff) |
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-android
Diffstat (limited to 'crypto')
-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 c90af2537d24..c571d85cfad7 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -483,6 +483,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; @@ -492,8 +493,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, |