diff options
author | Dmitriy Vyukov <[email protected]> | 2015-09-22 10:51:52 +0200 |
---|---|---|
committer | David S. Miller <[email protected]> | 2015-09-22 17:36:07 -0700 |
commit | 7def0f952eccdd0edb3c504f4dab35ee0d3aba1f (patch) | |
tree | b07b5d821064709d15bf725818ab3e3a751daafe /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 23eedbc2435ddd226717603c4f3c8efec7bdbb4d (diff) |
lib: fix data race in rhashtable_rehash_one
rhashtable_rehash_one() uses complex logic to update entry->next field,
after INIT_RHT_NULLS_HEAD and NULLS_MARKER expansion:
entry->next = 1 | ((base + off) << 1)
This can be compiled along the lines of:
entry->next = base + off
entry->next <<= 1
entry->next |= 1
Which will break concurrent readers.
NULLS value recomputation is not needed here, so just remove
the complex logic.
The data race was found with KernelThreadSanitizer (KTSAN).
Signed-off-by: Dmitry Vyukov <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Acked-by: Thomas Graf <[email protected]>
Acked-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions