commit | 02efdff7e209859c2755ebe93b3bd0e3d40123ab | [log] [tgz] |
---|---|---|
author | Florian Westphal <fw@strlen.de> | Tue Aug 09 12:16:05 2016 +0200 |
committer | Steffen Klassert <steffen.klassert@secunet.com> | Wed Aug 10 11:23:23 2016 +0200 |
tree | d7008910ee8bc52787e18eda78733c31ea44ba39 | |
parent | ae3fb6d32140e5c5b491892105ca89066171d217 [diff] |
xfrm: state: use atomic_inc_not_zero to increment refcount Once xfrm_state_lookup_byaddr no longer acquires the state lock another cpu might be freeing the state entry at the same time. To detect this we use atomic_inc_not_zero, we then signal -EAGAIN to caller in case our result was stale. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>