diff options
author | Florian Westphal <fw@strlen.de> | 2016-08-11 15:17:55 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2016-08-12 08:07:11 +0200 |
commit | e37cc8ade5afaf082f804c6d18eb23377146bec4 (patch) | |
tree | c9e1bf67bfedc04fb6e0b6840bd280198c300549 /crypto/testmgr.h | |
parent | 30846090a746edfdb230deadd638cfa96f7b8c91 (diff) | |
download | linux-e37cc8ade5afaf082f804c6d18eb23377146bec4.tar.bz2 |
xfrm: policy: use atomic_inc_not_zero in rcu section
If we don't hold the policy lock anymore the refcnt might
already be 0, i.e. policy struct is about to be free'd.
Switch to atomic_inc_not_zero to avoid this.
On removal policies are already unlinked from the tables (lists)
before the last _put occurs so we are not supposed to find the same
'dead' entry on the next loop, so its safe to just repeat the lookup.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'crypto/testmgr.h')
0 files changed, 0 insertions, 0 deletions