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.
Showing the changes to include/net (1 of 3 files). Show all
Unified · Split
| @@ -1552,6 +1552,7 @@ int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk, · 1551 unmodified lines | ||
| 1552 | 1552 | int (*func)(struct xfrm_state *, int, void*), void *); |
| 1553 | 1553 | void xfrm_state_walk_done(struct xfrm_state_walk *walk, struct net *net); |
| 1554 | 1554 | struct xfrm_state *xfrm_state_alloc(struct net *net); |
| 1555 | +void xfrm_state_free(struct xfrm_state *x); | |
| 1555 | 1556 | struct xfrm_state *xfrm_state_find(const xfrm_address_t *daddr, |
| 1556 | 1557 | const xfrm_address_t *saddr, |
| 1557 | 1558 | const struct flowi *fl, |