aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorFan Du <fan.du@windriver.com>2013-08-01 06:08:36 -0400
committerSteffen Klassert <steffen.klassert@secunet.com>2013-08-06 00:59:18 -0400
commit0659eea912cf2ce65298784b918904ba0f91f5e1 (patch)
tree603a0e4d8d6ff7bf07e736e4b073b0d3937693ba /net/xfrm
parent8603b9556e1727f0de7e43ef448c85ff93347f27 (diff)
xfrm: Delete hold_timer when destroy policy
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>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index d8da6b8c6ba8..f7078eb5b64e 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -308,7 +308,7 @@ void xfrm_policy_destroy(struct xfrm_policy *policy)
308{ 308{
309 BUG_ON(!policy->walk.dead); 309 BUG_ON(!policy->walk.dead);
310 310
311 if (del_timer(&policy->timer)) 311 if (del_timer(&policy->timer) || del_timer(&policy->polq.hold_timer))
312 BUG(); 312 BUG();
313 313
314 security_xfrm_policy_free(policy->security); 314 security_xfrm_policy_free(policy->security);