Commit:     5dba4797115c8fa05c1a4d12927a6ae0b33ffc41
Parent:     8a8037ac9dbe4eb20ce50aa20244faf77444f4a3
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 27 11:10:07 2007 +0800
Committer:  Herbert Xu <[EMAIL PROTECTED]>
CommitDate: Tue Nov 27 11:10:07 2007 +0800

    [XFRM]: Fix leak of expired xfrm_states
    The xfrm_timer calls __xfrm_state_delete, which drops the final reference
    manually without triggering destruction of the state. Change it to use
    xfrm_state_put to add the state to the gc list when we're dropping the
    last reference. The timer function may still continue to use the state
    safely since the final destruction does a del_timer_sync().
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
 net/xfrm/xfrm_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 224b44e..cf43c49 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -552,7 +552,7 @@ int __xfrm_state_delete(struct xfrm_state *x)
                 * The xfrm_state_alloc call gives a reference, and that
                 * is what we are dropping here.
-               __xfrm_state_put(x);
+               xfrm_state_put(x);
                err = 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to