Re: [PATCH v2] x86/mm/pat: (un)track_pfn_copy() fix + doc improvements
From: Ingo Molnar
Date: Wed Apr 09 2025 - 07:59:30 EST
* David Hildenbrand <david@xxxxxxxxxx> wrote:
> On 09.04.25 12:32, Ingo Molnar wrote:
> >
> > * David Hildenbrand <david@xxxxxxxxxx> wrote:
> >
> > > We got a late smatch warning and some additional review feedback.
> > >
> > > smatch warnings:
> > > mm/memory.c:1428 copy_page_range() error: uninitialized symbol 'pfn'.
> > >
> > > We actually use the pfn only when it is properly initialized; however,
> > > we may pass an uninitialized value to a function -- although it will not
> > > use it that likely still is UB in C.
> > >
> > > So let's just fix it by always initializing pfn in the caller of
> > > track_pfn_copy(), and improving the documentation of track_pfn_copy().
> > >
> > > While at it, clarify the doc of untrack_pfn_copy(), that internal checks
> > > make sure if we actually have to untrack anything.
> >
> > Note that the title isn't accurate anymore, it's not an 'x86/mm/pat'
> > patch, but an 'mm' patch.
>
> Agreed. Who will take this patch? If it's Andrew, can you fixup the subject
> please?
I was assuming Andrew would pick it up:
Acked-by: Ingo Molnar <mingo@xxxxxxxxxx>
But can pick it up too via tip:x86/urgent.
Thanks,
Ingo