]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: fix state reallocation in policy export
authorJohannes Berg <johannes.berg@intel.com>
Wed, 19 Aug 2020 19:52:38 +0000 (21:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Aug 2020 22:39:36 +0000 (15:39 -0700)
commitacede20b0a5eb5d77507ef2ca97accfc428cef5a
tree6e1dd506060d1a571d5d41ce5c539cd3f93c5a50
parentd9b7d133f0e845a4bce80d80ccf05b7cdae1b239
netlink: fix state reallocation in policy export

Evidently, when I did this previously, we didn't have more than
10 policies and didn't run into the reallocation path, because
it's missing a memset() for the unused policies. Fix that.

Fixes: 6ec88086e2e4 ("netlink: add infrastructure to expose policies to userspace")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/policy.c