aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/crypto_user.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 43fe85f20d57..f71960dea882 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -516,10 +516,12 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
return err;
}
- err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, CRYPTOCFGA_MAX,
- crypto_policy);
- if (err < 0)
- return err;
+ if (type != (CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE)) {
+ err = nlmsg_parse(nlh, crypto_msg_min[type], attrs,
+ CRYPTOCFGA_MAX, crypto_policy);
+ if (err < 0)
+ return err;
+ }
if (link->doit == NULL)
return -EINVAL;