Commit 87654cf
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: linke li <lilinke99@qq.com>
Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>1 parent ad7c5eb commit 87654cf
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6036 | 6036 | | |
6037 | 6037 | | |
6038 | 6038 | | |
6039 | | - | |
| 6039 | + | |
6040 | 6040 | | |
6041 | 6041 | | |
6042 | 6042 | | |
| |||
6241 | 6241 | | |
6242 | 6242 | | |
6243 | 6243 | | |
6244 | | - | |
| 6244 | + | |
6245 | 6245 | | |
6246 | 6246 | | |
6247 | 6247 | | |
| |||
6255 | 6255 | | |
6256 | 6256 | | |
6257 | 6257 | | |
6258 | | - | |
| 6258 | + | |
6259 | 6259 | | |
6260 | 6260 | | |
6261 | 6261 | | |
| |||
0 commit comments