• linke li's avatar
    mm/slub: mark racy accesses on slab->slabs · 87654cf7
    linke li authored
    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>
    87654cf7
slub.c 177 KB