diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-05-07 19:23:37 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-05-07 19:23:37 -0700 |
commit | f79ef2334a2754d1083f6c1a78151fab36a96150 (patch) | |
tree | f35023b8278a00f7e56ffd271f6183d083dac561 /kernel | |
parent | 463cf733689568e014555ceeba83f2f0dcaacf5a (diff) | |
parent | 28307e7f246706589657f5cb5b07b54dad3994ad (diff) |
Merge "taskstats: fix the length of cgroupstats_cmd_get_policy"
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/taskstats.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index 21f82c29c914..11cc757795cd 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c @@ -54,7 +54,11 @@ static const struct nla_policy taskstats_cmd_get_policy[TASKSTATS_CMD_ATTR_MAX+1 [TASKSTATS_CMD_ATTR_REGISTER_CPUMASK] = { .type = NLA_STRING }, [TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK] = { .type = NLA_STRING },}; -static const struct nla_policy cgroupstats_cmd_get_policy[CGROUPSTATS_CMD_ATTR_MAX+1] = { +/* + * We have to use TASKSTATS_CMD_ATTR_MAX here, it is the maxattr in the family. + * Make sure they are always aligned. + */ +static const struct nla_policy cgroupstats_cmd_get_policy[TASKSTATS_CMD_ATTR_MAX+1] = { [CGROUPSTATS_CMD_ATTR_FD] = { .type = NLA_U32 }, }; |