Commit 83b79378 authored by Krishna Kumar's avatar Krishna Kumar Committed by David S. Miller

[XFRM_USER]: xfrm_state_construct() needs to set x->km.state to XFRM_STATE_DEAD.

Otherwise this can lead to the BUG_TRAP in __xfrm_state_destroy when
xfrm_state_put() finds this is the last reference.
parent 6b00fc1c
......@@ -241,6 +241,7 @@ static struct xfrm_state *xfrm_state_construct(struct xfrm_usersa_info *p,
return x;
error:
x->km.state = XFRM_STATE_DEAD;
xfrm_state_put(x);
error_no_put:
*errp = err;
......
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