Commit e8d12276 authored by Herbert Xu's avatar Herbert Xu Committed by Stephen Hemminger

[IPSEC]: Lock policy in policy timer.

parent 46f55c63
...@@ -148,6 +148,8 @@ static void xfrm_policy_timer(unsigned long data) ...@@ -148,6 +148,8 @@ static void xfrm_policy_timer(unsigned long data)
int warn = 0; int warn = 0;
int dir; int dir;
read_lock(&xp->lock);
if (xp->dead) if (xp->dead)
goto out; goto out;
...@@ -197,6 +199,7 @@ static void xfrm_policy_timer(unsigned long data) ...@@ -197,6 +199,7 @@ static void xfrm_policy_timer(unsigned long data)
xfrm_pol_hold(xp); xfrm_pol_hold(xp);
out: out:
read_unlock(&xp->lock);
xfrm_pol_put(xp); xfrm_pol_put(xp);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment