diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-04-08 14:27:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-08 14:27:42 -0400 |
commit | e4077e018b5ead3de9951fc01d8bf12eeeeeefed (patch) | |
tree | f360f4ecacba17132c81ac37b6b737f1458f2d02 | |
parent | 0a5bff744a6263d397f88671ed2f772da9c64989 (diff) |
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>
-rw-r--r-- | include/net/xfrm.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 625dd61ccbba..cccb049991a9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -735,19 +735,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy) | |||
735 | xfrm_policy_destroy(policy); | 735 | xfrm_policy_destroy(policy); |
736 | } | 736 | } |
737 | 737 | ||
738 | #ifdef CONFIG_XFRM_SUB_POLICY | ||
739 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | 738 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) |
740 | { | 739 | { |
741 | int i; | 740 | int i; |
742 | for (i = npols - 1; i >= 0; --i) | 741 | for (i = npols - 1; i >= 0; --i) |
743 | xfrm_pol_put(pols[i]); | 742 | xfrm_pol_put(pols[i]); |
744 | } | 743 | } |
745 | #else | ||
746 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | ||
747 | { | ||
748 | xfrm_pol_put(pols[0]); | ||
749 | } | ||
750 | #endif | ||
751 | 744 | ||
752 | extern void __xfrm_state_destroy(struct xfrm_state *); | 745 | extern void __xfrm_state_destroy(struct xfrm_state *); |
753 | 746 | ||