Skip to content
Commit 37b08e34 authored by David S. Miller's avatar David S. Miller
Browse files

ipsec: Fix deadlock in xfrm_state management.



Ever since commit 4c563f76
("[XFRM]: Speed up xfrm_policy and xfrm_state walking") it is
illegal to call __xfrm_state_destroy (and thus xfrm_state_put())
with xfrm_state_lock held.  If we do, we'll deadlock since we
have the lock already and __xfrm_state_destroy() tries to take
it again.

Fix this by pushing the xfrm_state_put() calls after the lock
is dropped.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06770843
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