Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[cascardo/linux.git] / crypto / crypto_user.c
index 16f8693..f76e42b 100644 (file)
@@ -304,7 +304,7 @@ static int crypto_del_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
 static int crypto_add_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
                          struct nlattr **attrs)
 {
-       int exact;
+       int exact = 0;
        const char *name;
        struct crypto_alg *alg;
        struct crypto_user_alg *p = nlmsg_data(nlh);
@@ -389,9 +389,13 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
            (nlh->nlmsg_flags & NLM_F_DUMP))) {
                if (link->dump == NULL)
                        return -EINVAL;
-
-               return netlink_dump_start(crypto_nlsk, skb, nlh,
-                                         link->dump, link->done, 0);
+               {
+                       struct netlink_dump_control c = {
+                               .dump = link->dump,
+                               .done = link->done,
+                       };
+                       return netlink_dump_start(crypto_nlsk, skb, nlh, &c);
+               }
        }
 
        err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, CRYPTOCFGA_MAX,