summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2016-03-10 17:12:01 -0500
committerSteven Rostedt <rostedt@goodmis.org>2016-03-10 17:12:01 -0500
commitf023eebbc840300319282c09299916243c910a13 (patch)
tree06cf3f215711cff3aca045dab763501089613e92 /crypto
parenta69d68687e04e6f5e9b79a5ac8dacc9d86f195c7 (diff)
parent0f67c5beb42a8328e9e661dcfcc4d328b6138264 (diff)
downloadlinux-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.c6
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,