summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2023-07-31 13:38:26 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2023-08-01 12:04:43 +0200
commit982c3aca8bac8ae38acdc940e4f1ecec3bffc623 (patch)
tree8da7cc956db5dc4257e0f68d8977ce8be0a81e44 /net/xfrm/xfrm_user.c
parentxfrm: add forgotten nla_policy for XFRMA_MTIMER_THRESH (diff)
downloadlinux-982c3aca8bac8ae38acdc940e4f1ecec3bffc623.tar.xz
linux-982c3aca8bac8ae38acdc940e4f1ecec3bffc623.zip
xfrm: delete offloaded policy
The policy memory was released but not HW driver data. Add call to xfrm_dev_policy_delete(), so drivers will have a chance to release their resources. Fixes: 919e43fad516 ("xfrm: add an interface to offload policy") Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index f06d6deb58dd..ad01997c3aa9 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2345,6 +2345,7 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
NETLINK_CB(skb).portid);
}
} else {
+ xfrm_dev_policy_delete(xp);
xfrm_audit_policy_delete(xp, err ? 0 : 1, true);
if (err != 0)