aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorlinke li <[email protected]>2024-04-26 18:34:44 +0800
committerJens Axboe <[email protected]>2024-04-26 07:40:28 -0600
commit6ad0d7e0f4b68f87a98ea2b239123b7d865df86b (patch)
treed8ac274dd632519dc9f9694cd631024cfb3eeaa7 /tools/perf/util/scripting-engines/trace-event-python.c
parent07d1b99825f40f9c0d93e6b99d79a08d0717bac1 (diff)
sbitmap: use READ_ONCE to access map->word
In __sbitmap_queue_get_batch(), map->word is read several times, and update atomically using atomic_long_try_cmpxchg(). But the first two read of map->word is not protected. This patch moves the statement val = READ_ONCE(map->word) forward, eliminating unprotected accesses to map->word within the function. It is aimed at reducing the number of benign races reported by KCSAN in order to focus future debugging effort on harmful races. Signed-off-by: linke li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions