summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMathias Krause2018-11-21 21:09:23 +0100
committerGreg Kroah-Hartman2018-12-29 13:37:58 +0100
commit5ecdfbb0d9f0f588ca6bfcb7703bc816a2b9fab5 (patch)
tree6ab2c7693d1adc531e54d358abcabbe0b937b84d /include/net
parentmm: introduce mm_[p4d|pud|pmd]_folded (diff)
downloadkernel-qcow2-linux-5ecdfbb0d9f0f588ca6bfcb7703bc816a2b9fab5.tar.gz
kernel-qcow2-linux-5ecdfbb0d9f0f588ca6bfcb7703bc816a2b9fab5.tar.xz
kernel-qcow2-linux-5ecdfbb0d9f0f588ca6bfcb7703bc816a2b9fab5.zip
xfrm_user: fix freeing of xfrm states on acquire
commit 4a135e538962cb00a9667c82e7d2b9e4d7cd7177 upstream. Commit 565f0fa902b6 ("xfrm: use a dedicated slab cache for struct xfrm_state") moved xfrm state objects to use their own slab cache. However, it missed to adapt xfrm_user to use this new cache when freeing xfrm states. Fix this by introducing and make use of a new helper for freeing xfrm_state objects. Fixes: 565f0fa902b6 ("xfrm: use a dedicated slab cache for struct xfrm_state") Reported-by: Pan Bian <bianpan2016@163.com> Cc: <stable@vger.kernel.org> # v4.18+ Signed-off-by: Mathias Krause <minipli@googlemail.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net')
-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 0eb390c205af..da588def3c61 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1552,6 +1552,7 @@ int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
int (*func)(struct xfrm_state *, int, void*), void *);
void xfrm_state_walk_done(struct xfrm_state_walk *walk, struct net *net);
struct xfrm_state *xfrm_state_alloc(struct net *net);
+void xfrm_state_free(struct xfrm_state *x);
struct xfrm_state *xfrm_state_find(const xfrm_address_t *daddr,
const xfrm_address_t *saddr,
const struct flowi *fl,