summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-12-09 16:44:51 +0100
committerJakub Kicinski <kuba@kernel.org>2021-12-10 17:16:33 +0100
commite1b539bd73a76dc8a7bf82befe6eac4ae79c76b3 (patch)
treec54db186866f0de34debc908ec348ba1dc1fc0b3 /include/net/xfrm.h
parentMerge branch 'net-netns-refcount-tracking-base-series' (diff)
downloadlinux-e1b539bd73a76dc8a7bf82befe6eac4ae79c76b3.tar.xz
linux-e1b539bd73a76dc8a7bf82befe6eac4ae79c76b3.zip
xfrm: add net device refcount tracker to struct xfrm_state_offload
Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Link: https://lore.kernel.org/r/20211209154451.4184050-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 2308210793a0..83b46da8873d 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -128,6 +128,7 @@ struct xfrm_state_walk {
struct xfrm_state_offload {
struct net_device *dev;
+ netdevice_tracker dev_tracker;
struct net_device *real_dev;
unsigned long offload_handle;
unsigned int num_exthdrs;
@@ -1913,7 +1914,7 @@ static inline void xfrm_dev_state_free(struct xfrm_state *x)
if (dev->xfrmdev_ops->xdo_dev_state_free)
dev->xfrmdev_ops->xdo_dev_state_free(x);
xso->dev = NULL;
- dev_put(dev);
+ dev_put_track(dev, &xso->dev_tracker);
}
}
#else