aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-12-04 20:22:17 -0800
committerJakub Kicinski <kuba@kernel.org>2021-12-06 16:06:02 -0800
commit5fa5ae605821e0e10ee489d9a6e331fd287ccc57 (patch)
tree54ecbe3957c2a4ea0edf2134b2a7272546fdd9ce /net/core/netpoll.c
parentipmr, ip6mr: add net device refcount tracker to struct vif_device (diff)
downloadlinux-dev-5fa5ae605821e0e10ee489d9a6e331fd287ccc57.tar.xz
linux-dev-5fa5ae605821e0e10ee489d9a6e331fd287ccc57.zip
netpoll: add net device refcount tracker to struct netpoll
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index edfc0f8011f8..db724463e7cd 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -776,7 +776,7 @@ put_noaddr:
err = __netpoll_setup(np, ndev);
if (err)
goto put;
-
+ netdev_tracker_alloc(ndev, &np->dev_tracker, GFP_KERNEL);
rtnl_unlock();
return 0;
@@ -853,7 +853,7 @@ void netpoll_cleanup(struct netpoll *np)
if (!np->dev)
goto out;
__netpoll_cleanup(np);
- dev_put(np->dev);
+ dev_put_track(np->dev, &np->dev_tracker);
np->dev = NULL;
out:
rtnl_unlock();