diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2016-03-10 17:12:01 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-03-10 17:12:01 -0500 |
commit | f023eebbc840300319282c09299916243c910a13 (patch) | |
tree | 06cf3f215711cff3aca045dab763501089613e92 /crypto | |
parent | a69d68687e04e6f5e9b79a5ac8dacc9d86f195c7 (diff) | |
parent | 0f67c5beb42a8328e9e661dcfcc4d328b6138264 (diff) | |
download | linux-rt-f023eebbc840300319282c09299916243c910a13.tar.gz |
Merge tag 'v3.18.28' into v3.18-rt
Linux 3.18.28
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, |