]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/taskstats.c
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux.git] / kernel / taskstats.c
index ef4f9cd980fd172a9366f12d010e0b90f818eedd..5f852b8f59f72b9c0b19f105ab3289e3ea0a0809 100644 (file)
@@ -649,12 +649,14 @@ void taskstats_exit(struct task_struct *tsk, int group_dead)
 static const struct genl_ops taskstats_ops[] = {
        {
                .cmd            = TASKSTATS_CMD_GET,
+               .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .doit           = taskstats_user_cmd,
                /* policy enforced later */
                .flags          = GENL_ADMIN_PERM | GENL_CMD_CAP_HASPOL,
        },
        {
                .cmd            = CGROUPSTATS_CMD_GET,
+               .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .doit           = cgroupstats_user_cmd,
                /* policy enforced later */
                .flags          = GENL_CMD_CAP_HASPOL,
@@ -677,8 +679,9 @@ static int taskstats_pre_doit(const struct genl_ops *ops, struct sk_buff *skb,
                return -EINVAL;
        }
 
-       return nlmsg_validate(info->nlhdr, GENL_HDRLEN, TASKSTATS_CMD_ATTR_MAX,
-                             policy, info->extack);
+       return nlmsg_validate_deprecated(info->nlhdr, GENL_HDRLEN,
+                                        TASKSTATS_CMD_ATTR_MAX, policy,
+                                        info->extack);
 }
 
 static struct genl_family family __ro_after_init = {