Commit 0659eea912cf2ce65298784b918904ba0f91f5e1

Authored by Fan Du
Committed by Steffen Klassert
1 parent 8603b9556e

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/xfrm/xfrm_policy.c
... ... @@ -308,7 +308,7 @@
308 308 {
309 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 312 BUG();
313 313  
314 314 security_xfrm_policy_free(policy->security);