diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-14 06:57:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-14 06:57:52 +0200 |
commit | 1622d35453132a1acd6d650175f9f45e4bcf553e (patch) | |
tree | 063a2dfa220452590d068418c2b16b90690dae5a /net/netlink/policy.c | |
parent | staging: regulator: hi6421v600-regulator: Remove unused including <linux/vers... (diff) | |
parent | Linux 5.9-rc5 (diff) | |
download | linux-1622d35453132a1acd6d650175f9f45e4bcf553e.tar.xz linux-1622d35453132a1acd6d650175f9f45e4bcf553e.zip |
Merge 5.9-rc5 into staging-next
We want the staging/iio changes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/netlink/policy.c')
-rw-r--r-- | net/netlink/policy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/netlink/policy.c b/net/netlink/policy.c index f6491853c797..641ffbdd977a 100644 --- a/net/netlink/policy.c +++ b/net/netlink/policy.c @@ -51,6 +51,9 @@ static int add_policy(struct nl_policy_dump **statep, if (!state) return -ENOMEM; + memset(&state->policies[state->n_alloc], 0, + flex_array_size(state, policies, n_alloc - state->n_alloc)); + state->policies[state->n_alloc].policy = policy; state->policies[state->n_alloc].maxtype = maxtype; state->n_alloc = n_alloc; @@ -185,7 +188,7 @@ send_attribute: goto next; case NLA_NESTED: type = NL_ATTR_TYPE_NESTED; - /* fall through */ + fallthrough; case NLA_NESTED_ARRAY: if (pt->type == NLA_NESTED_ARRAY) type = NL_ATTR_TYPE_NESTED_ARRAY; |