ethtool: use ethnl_parse_header_dev_put()
It seems I missed that most ethnl_parse_header_dev_get() callers
declare an on-stack struct ethnl_req_info, and that they simply call
dev_put(req_info.dev) when about to return.
Add ethnl_parse_header_dev_put() helper to properly untrack
reference taken by ethnl_parse_header_dev_get().
Fixes: e4b8954074
("netlink: add net device refcount tracker to struct ethnl_req_info")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6cf7a1ac0f
commit
34ac17ecbf
@ -283,6 +283,6 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info)
|
||||
|
||||
out_rtnl:
|
||||
rtnl_unlock();
|
||||
dev_put(dev);
|
||||
ethnl_parse_header_dev_put(&req_info);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user