summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-12-04 20:22:05 -0800
committerJakub Kicinski <kuba@kernel.org>2021-12-06 16:05:11 -0800
commitc0fd407a0666a583a765cfb129c4dc492590ca89 (patch)
tree7b40027f7725b6ba67db018345916038f06f3526 /net/ipv6
parentfb67510ba9bd3ed1f8a2db4946e847ca0418f8dc (diff)
downloadlinux-c0fd407a0666a583a765cfb129c4dc492590ca89.tar.bz2
sit: add net device refcount tracking to ip_tunnel
Note that other ip_tunnel users do not seem to hold a reference on tunnel->dev. Probably needs some investigations. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/sit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 1b57ee36d668..057c0f83c800 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -521,7 +521,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
ipip6_tunnel_del_prl(tunnel, NULL);
}
dst_cache_reset(&tunnel->dst_cache);
- dev_put(dev);
+ dev_put_track(dev, &tunnel->dev_tracker);
}
static int ipip6_err(struct sk_buff *skb, u32 info)
@@ -1463,7 +1463,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
dev->tstats = NULL;
return err;
}
- dev_hold(dev);
+ dev_hold_track(dev, &tunnel->dev_tracker, GFP_KERNEL);
return 0;
}