xfrm: add net device refcount tracker to struct xfrm_state_offload
Subsystems (3)
PATCH 1/1 xfrm: add net device refcount tracker to struct xfrm_state_offload
From: Eric Dumazet <[email protected]>
Signed-off-by Eric Dumazet <[email protected]>
Cc Steffen Klassert <[email protected]>
--- include/net/xfrm.h | 3 ++- net/xfrm/xfrm_device.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
include/net/xfrm.h +2 -1
@@ -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
net/xfrm/xfrm_device.c +2 -1
@@ -259,6 +259,7 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x, } xso->dev = dev; +netdev_tracker_alloc (dev, &xso->dev_tracker,GFP_ATOMIC ); xso->real_dev = dev; xso->num_exthdrs =1 ; xso->flags = xuo->flags;
@@ -269,7 +270,7 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x, xso->flags =0 ; xso->dev =NULL ; xso->real_dev =NULL ; -dev_put (dev); +dev_put_track (dev, &xso->dev_tracker);if (err != -EOPNOTSUPP )return err;
Signature · 1 line
2.34.1.400.ga245620fadb-goog
Quoted 4 lines · Eric Dumazet
From: Eric Dumazet <[email protected]>
Signed-off-by Eric Dumazet <[email protected]>Cc Steffen Klassert <[email protected]>
As the refcount tracking infrastructure is not yet in ipsec-next:
Acked-by Steffen Klassert <[email protected]>
Thanks!
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 9 Dec 2021 07:44:51 -0800 you wrote:
From: Eric Dumazet <[email protected]>
Signed-off-by Eric Dumazet <[email protected]>Cc Steffen Klassert <[email protected]>--- include/net/xfrm.h | 3 ++- net/xfrm/xfrm_device.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net-next] xfrm: add net device refcount tracker to struct xfrm_state_offload
https://git.kernel.org/netdev/net-next/c/e1b539bd73a7
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html