Re: [PATCH v2] mm/hugetlb: fix copy_hugetlb_page_range() to use ->pt_share_count

jane.chu
2025-09-11T19:59:22Z

On 9/11/2025 1:17 AM, David Hildenbrand wrote:
[..]
>>
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>> index 753f99b4c718..8ca5b4f7805f 100644
>> --- a/mm/hugetlb.c
>> +++ b/mm/hugetlb.c
>> @@ -5594,18 +5594,13 @@ int copy_hugetlb_page_range(struct mm_struct
>> *dst, struct mm_struct *src,
>>               break;
>>           }
>> -        /*
>> -         * If the pagetables are shared don't copy or take references.
>> -         *
>> -         * dst_pte == src_pte is the common case of src/dest sharing.
>> -         * However, src could have 'unshared' and dst shares with
>> -         * another vma. So page_count of ptep page is checked instead
>> -         * to reliably determine whether pte is shared.
>> -         */
>
> I think you ignored my question to v1 regarding the change of comment.
>

Sorry David, didn't mean disrespect, I missed your earlier comments.
I just replied.

Thanks,
-jane