]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Fix refcount imbalance in xfrm_lookup
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 18 Jun 2014 10:34:21 +0000 (12:34 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 26 Jun 2014 05:52:42 +0000 (07:52 +0200)
commit1b7fe354127425716e5e1001bcd477ecc4fd8fcf
tree641c49c3387d197987924261652ace642d106c12
parent068e8141097bdb18bf52569e8fc52fc84baa5b67
xfrm: Fix refcount imbalance in xfrm_lookup

xfrm_lookup must return a dst_entry with a refcount for the caller.
Git commit 91a52c74f81 ("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: 91a52c74f81 ("xfrm: Remove caching of xfrm_policy_sk_bundles")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c