Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376676
b: refs/heads/master
c: e4c1721
h: refs/heads/master
v: v3
  • Loading branch information
Paul Moore authored and David S. Miller committed Jun 1, 2013
1 parent c3382eb commit c5caf60
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e2bd517c108816220f262d7954b697af03b5f9c
refs/heads/master: e4c1721642bbd42d8142f4811cde0588c28db51d
5 changes: 5 additions & 0 deletions trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,8 @@ static inline void xfrm_sk_free_policy(struct sock *sk)
}
}

extern void xfrm_garbage_collect(struct net *net);

#else

static inline void xfrm_sk_free_policy(struct sock *sk) {}
Expand Down Expand Up @@ -1194,6 +1196,9 @@ static inline int xfrm6_policy_check_reverse(struct sock *sk, int dir,
{
return 1;
}
static inline void xfrm_garbage_collect(struct net *net)
{
}
#endif

static __inline__
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,8 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, const struct sa

out:
xfrm_pol_put(xp);
if (err == 0)
xfrm_garbage_collect(net);
return err;
}

Expand Down Expand Up @@ -2615,6 +2617,8 @@ static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, const struct sadb_

out:
xfrm_pol_put(xp);
if (delete && err == 0)
xfrm_garbage_collect(net);
return err;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2557,11 +2557,12 @@ static void __xfrm_garbage_collect(struct net *net)
}
}

static void xfrm_garbage_collect(struct net *net)
void xfrm_garbage_collect(struct net *net)
{
flow_cache_flush();
__xfrm_garbage_collect(net);
}
EXPORT_SYMBOL(xfrm_garbage_collect);

static void xfrm_garbage_collect_deferred(struct net *net)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,8 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh,

out:
xfrm_pol_put(xp);
if (delete && err == 0)
xfrm_garbage_collect(net);
return err;
}

Expand Down

0 comments on commit c5caf60

Please sign in to comment.