Commit 81187eb8 authored by Krishna Kumar's avatar Krishna Kumar Committed by David S. Miller

[IPCOMP]: Set x->km.state to XFRM_STATE_DEAD in ipcomp_tunnel_create().

Otherwise we can trigger the BUG trap in __xfrm_state_destroy() when
xfrm_state_put() finds this is the last reference.
parent 8d26a9f2
...@@ -294,6 +294,7 @@ static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x) ...@@ -294,6 +294,7 @@ static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x)
return t; return t;
error: error:
t->km.state = XFRM_STATE_DEAD;
xfrm_state_put(t); xfrm_state_put(t);
t = NULL; t = NULL;
goto out; goto out;
......
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