diff options
author | 2019-01-04 14:17:01 +0100 | |
---|---|---|
committer | 2019-01-09 13:58:23 +0100 | |
commit | 7a474c36586f4277f930ab7e6865c97e44dfc3bc (patch) | |
tree | 5495f12516af3b388932004c7ee9dd1eaa179e44 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | xfrm: policy: use hlist rcu variants on inexact insert, part 2 (diff) | |
download | linux-dev-7a474c36586f4277f930ab7e6865c97e44dfc3bc.tar.xz linux-dev-7a474c36586f4277f930ab7e6865c97e44dfc3bc.zip |
xfrm: policy: increment xfrm_hash_generation on hash rebuild
Hash rebuild will re-set all the inexact entries, then re-insert them.
Lookups that can occur in parallel will therefore not find any policies.
This was safe when lookups were still guarded by rwlock.
After rcu-ification, lookups check the hash_generation seqcount to detect
when a hash resize takes place. Hash rebuild missed the needed increment.
Hash resizes and hash rebuilds cannot occur in parallel (both acquire
hash_resize_mutex), so just increment xfrm_hash_generation, like resize.
Fixes: a7c44247f704e3 ("xfrm: policy: make xfrm_policy_lookup_bytype lockless")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions