Commit c4b76e18 authored by Steffen Klassert's avatar Steffen Klassert Committed by Greg Kroah-Hartman
Browse files

xfrm: Fix refcount imbalance in xfrm_lookup



[ Upstream commit b7eea454 ]

xfrm_lookup must return a dst_entry with a refcount for the caller.
Git commit 1a1ccc96 ("xfrm: Remove caching of xfrm_policy_sk_bundles")
removed this refcount for the socket policy case accidentally.
This patch restores it and sets DST_NOCACHE flag to make sure
that the dst_entry is freed when the refcount becomes null.

Fixes: 1a1ccc96 ("xfrm: Remove caching of xfrm_policy_sk_bundles")
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34ada362
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment