diff options
| author | David Hildenbrand <[email protected]> | 2025-04-08 08:59:50 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-04-12 00:32:41 +0000 |
| commit | 8c56c5dbcf52220cc9be7a36e7f21ebd5939e0b9 (patch) | |
| tree | 1ae5ef4d77251090221b07f28c7c16098ceb0a52 /lib/alloc_tag.c | |
| parent | mm: fix filemap_get_folios_contig returning batches of identical folios (diff) | |
| download | kernel-8c56c5dbcf52220cc9be7a36e7f21ebd5939e0b9.tar.gz kernel-8c56c5dbcf52220cc9be7a36e7f21ebd5939e0b9.zip | |
mm: (un)track_pfn_copy() fix + doc improvements
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.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: dc84bc2aba85 ("x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range()")
Signed-off-by: David Hildenbrand <[email protected]>
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Reviewed-by: Lorenzo Stoakes <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Linus Torvalds <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/alloc_tag.c')
0 files changed, 0 insertions, 0 deletions
