summaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-12-07 02:30:28 +0100
committerJakub Kicinski <kuba@kernel.org>2021-12-08 05:44:58 +0100
commit19c9ebf6ed70856385296a65e78c1699081b152f (patch)
treea741cbb9ccb135863e5a8ee534df058546bde127 /net/8021q/vlan_dev.c
parentnet: eql: add net device refcount tracker (diff)
downloadlinux-19c9ebf6ed70856385296a65e78c1699081b152f.tar.xz
linux-19c9ebf6ed70856385296a65e78c1699081b152f.zip
vlan: add net device refcount tracker
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 866556e041b7..26d031a43cc1 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -616,7 +616,7 @@ static int vlan_dev_init(struct net_device *dev)
return -ENOMEM;
/* Get vlan's reference to real_dev */
- dev_hold(real_dev);
+ dev_hold_track(real_dev, &vlan->dev_tracker, GFP_KERNEL);
return 0;
}
@@ -848,7 +848,7 @@ static void vlan_dev_free(struct net_device *dev)
vlan->vlan_pcpu_stats = NULL;
/* Get rid of the vlan's reference to real_dev */
- dev_put(vlan->real_dev);
+ dev_put_track(vlan->real_dev, &vlan->dev_tracker);
}
void vlan_setup(struct net_device *dev)