[PATCH v2 01/47] mm/mglru: don't use stack pointers when walking PUD and PMD tables
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Oct 29 20:40:11 PDT 2026
> From: Josef Bacik <josef at toxicpanda.com>
>
> MGLRU passes stack copies of page-table entries in walk_pud_range() and
> walk_pmd_range() when walking to the next level. These copies can become
> stale when khugepaged or MADV_DONTNEED (CONFIG_PT_RECLAIM) removes a PTE
> table concurrently.
>
> This pattern dates back to commit bd74fdaea146 ("mm: multi-gen LRU:
> support page table walks"). Likely, earlier locking masked the latent
> bug. Later changes exposed it: commit 1d65b771bc08 ("mm/khugepaged:
> retract_page_tables() without mmap or vma lock") allowed concurrent
> retraction, and commit cf4a65539c13 ("memcg-v1: no need for memcg locking
> for MGLRU") dropped the walker's outer RCU protection.
>
> The fix is simple, so just fix the original commit so we don't have to
> [ ... ]
> Reviewed-by: Barry Song <baohua at kernel.org>
> Reviewed-by: Baolin Wang <baolin.wang at linux.alibaba.com>
> Reviewed-by: Pedro Falcato <pfalcato at suse.de>
> Reviewed-by: Kiryl Shutsemau (Meta) <kas at kernel.org>
> Signed-off-by: David Hildenbrand (Arm) <david at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261029-fixes_core-v2-0-a64ce7f83abb@kernel.org?part=1
More information about the kexec
mailing list