Skip to content

Commit

Permalink
xfrm: delete offloaded policy
Browse files Browse the repository at this point in the history
[ Upstream commit 982c3ac ]

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: 919e43f ("xfrm: add an interface to offload policy")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
rleon authored and gregkh committed Aug 23, 2023
1 parent a902051 commit 757eaa5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/xfrm/xfrm_user.c
Expand Up @@ -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)
Expand Down

0 comments on commit 757eaa5

Please sign in to comment.