summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2023-07-31 14:38:27 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2023-08-01 12:04:43 +0200
commitf3ec2b5d879ef5bbcb24678914641343cb6399a2 (patch)
treee9dd2fb2ebc630b44cb3aff9b16e300bd25ff122 /include/net/xfrm.h
parent982c3aca8bac8ae38acdc940e4f1ecec3bffc623 (diff)
downloadlinux-f3ec2b5d879ef5bbcb24678914641343cb6399a2.tar.gz
linux-f3ec2b5d879ef5bbcb24678914641343cb6399a2.tar.bz2
linux-f3ec2b5d879ef5bbcb24678914641343cb6399a2.zip
xfrm: don't skip free of empty state in acquire policy
In destruction flow, the assignment of NULL to xso->dev caused to skip of xfrm_dev_state_free() call, which was called in xfrm_state_put(to_put) routine. Instead of open-coded variant of xfrm_dev_state_delete() and xfrm_dev_state_free(), let's use them directly. Fixes: f8a70afafc17 ("xfrm: add TX datapath support for IPsec packet offload mode") Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 151ca95dd08d..363c7d510554 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1984,6 +1984,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;
+ xso->type = XFRM_DEV_OFFLOAD_UNSPECIFIED;
netdev_put(dev, &xso->dev_tracker);
}
}