mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:30:58 +07:00
xfrm: Fix crashes in xfrm_lookup()
From: Timo Teräs <timo.teras@iki.fi> Happens because CONFIG_XFRM_SUB_POLICY is not enabled, and one of the helper functions I used did unexpected things in that case. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0a5bff744a
commit
e4077e018b
@ -735,19 +735,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy)
|
||||
xfrm_policy_destroy(policy);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFRM_SUB_POLICY
|
||||
static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
|
||||
{
|
||||
int i;
|
||||
for (i = npols - 1; i >= 0; --i)
|
||||
xfrm_pol_put(pols[i]);
|
||||
}
|
||||
#else
|
||||
static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
|
||||
{
|
||||
xfrm_pol_put(pols[0]);
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void __xfrm_state_destroy(struct xfrm_state *);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user