if (link->dump == NULL)
return -EINVAL;
- return netlink_dump_start(crypto_nlsk, skb, nlh,
+ down_read(&crypto_alg_sem);
+ err = netlink_dump_start(crypto_nlsk, skb, nlh,
link->dump, link->done, 0);
+ up_read(&crypto_alg_sem);
+
+ return err;
}
err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, CRYPTOCFGA_MAX,