netlink: fix policy dump leak
[ Upstream commita95bc734e6] If userspace doesn't complete the policy dump, we leak the allocated state. Fix this. Fixes:d07dcf9aad("netlink: add infrastructure to expose policies to userspace") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
360f898746
commit
949ca6b82e
@@ -1938,7 +1938,8 @@ void nla_get_range_signed(const struct nla_policy *pt,
|
||||
int netlink_policy_dump_start(const struct nla_policy *policy,
|
||||
unsigned int maxtype,
|
||||
unsigned long *state);
|
||||
bool netlink_policy_dump_loop(unsigned long *state);
|
||||
bool netlink_policy_dump_loop(unsigned long state);
|
||||
int netlink_policy_dump_write(struct sk_buff *skb, unsigned long state);
|
||||
void netlink_policy_dump_free(unsigned long state);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user