Re: [PATCH v2] mm/slub: mark racy accesses on slab->slabs
From: Vlastimil Babka
Date: Mon Mar 25 2024 - 09:47:06 EST
On 3/25/24 9:49 AM, Chengming Zhou wrote:
> On 2024/3/25 16:48, Vlastimil Babka wrote:
>> On 3/21/24 4:48 AM, linke li wrote:
>>> 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@xxxxxx>
>>> Reviewed-by: Chengming Zhou <chengming.zhou@xxxxxxxxx>
>>
>> Chengming provided feedback to v1 but not offered a Reviewed-by: AFAICS? Or
>> maybe will offer it now? :)
>
> Ah, right.
>
> Reviewed-by: Chengming Zhou <chengming.zhou@xxxxxxxxx>
Thanks, added to slab/for-6.10/cleanup