]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xfrm: Delete hold_timer when destroy policy
authorFan Du <fan.du@windriver.com>
Thu, 1 Aug 2013 10:08:36 +0000 (18:08 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 6 Aug 2013 04:59:18 +0000 (06:59 +0200)
Both policy timer and hold_timer need to be deleted when destroy policy

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c

index d8da6b8c6ba8b980c12564476c06f29d51f21ea0..f7078eb5b64e2bba4e98c5d3150d2b803816f870 100644 (file)
@@ -308,7 +308,7 @@ void xfrm_policy_destroy(struct xfrm_policy *policy)
 {
        BUG_ON(!policy->walk.dead);
 
-       if (del_timer(&policy->timer))
+       if (del_timer(&policy->timer) || del_timer(&policy->polq.hold_timer))
                BUG();
 
        security_xfrm_policy_free(policy->security);