Commit 87654cf7 authored by linke li's avatar linke li Committed by Vlastimil Babka
Browse files

mm/slub: mark racy accesses on slab->slabs



The reads of slab->slabs are racy because it may be changed by
put_cpu_partial concurrently. In slabs_cpu_partial_show() and
show_slab_objects(), slab->slabs is only used for showing information.

Data-racy reads from shared variables that are used only for diagnostic
purposes should typically use data_race(), since it is normally not a
problem if the values are off by a little.

This patch 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: default avatarlinke li <lilinke99@qq.com>
Reviewed-by: default avatarChengming Zhou <chengming.zhou@linux.dev>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent ad7c5ebe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment