summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorDavid Hildenbrand (Arm) <david@kernel.org>2026-10-23 14:47:29 +0100
committerAndrew Morton <akpm@linux-foundation.org>2026-11-02 18:14:42 -0800
commit652f15be3c11415725694ccea317c51e35c0b582 (patch)
treebebe8b40360ce51a6661e743ec7d0617911256a1 /scripts/stackusage
parent769417e410dd19b2a438c6addb61b194b7a4c387 (diff)
mm/madvise: preserve VMA_SOFTDIRTY_BIT when changing anonymous names
When changing the anonymous VMA name, madvise_update_vma() calls vma_modify_name() to possibly merge with adjacent VMAs. We don't call vma_modify_flags() and consequently don't obtain the new VMA flags. Later in the function we update the VMA flags to the stale new_vma_flags we obtained before. This can result in us losing the VMA_SOFTDIRTY_BIT flag set on a VMA we just merged with. There is no need to update the VMA flags at all, so just exit early. This skips calling khugepaged_enter_vma(), but since the flags didn't change this is fine. [ljs@kernel.org: minor edit of commit message, rebased] Link: https://lore.kernel.org/20261023-fix-vma-atomic-v1-3-8ff4fae1fc85@kernel.org Fixes: 9a10064f5625 ("mm: add a field to store names for private anonymous memory") Signed-off-by: David Hildenbrand (Arm) <david@kernel.org> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Tested-by: Gregory Price (Meta) <gourry@gourry.net> Cc: Liam R. Howlett <liam@infradead.org> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: Mike Rapoport <rppt@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Jann Horn <jannh@google.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: SJ Park <sj@kernel.org> Cc: Kees Cook <kees@kernel.org> Cc: Colin Cross <ccross@google.com> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions