diff options
author | Eric Dumazet <edumazet@google.com> | 2021-12-14 09:42:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-15 11:27:47 +0100 |
commit | 34ac17ecbf575eb079094d44f1bd30c66897aa21 (patch) | |
tree | 2b548e07ac179eb8b5dbcb8f45a953c0baf1ef6e /net/ethtool/debug.c | |
parent | Merge branch 'net-dsa-hellcreek-fix-handling-of-mgmt-protocols' (diff) | |
download | linux-34ac17ecbf575eb079094d44f1bd30c66897aa21.tar.xz linux-34ac17ecbf575eb079094d44f1bd30c66897aa21.zip |
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: e4b8954074f6 ("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>
Diffstat (limited to 'net/ethtool/debug.c')
-rw-r--r-- | net/ethtool/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethtool/debug.c b/net/ethtool/debug.c index f99912d7957e..d73888c7d19c 100644 --- a/net/ethtool/debug.c +++ b/net/ethtool/debug.c @@ -123,6 +123,6 @@ out_ops: out_rtnl: rtnl_unlock(); out_dev: - dev_put(dev); + ethnl_parse_header_dev_put(&req_info); return ret; } |