diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2024-04-25 20:58:57 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-04-25 20:58:57 -0700 |
commit | 275ccbdfac3a94a7412fcb5573b019e2d28003d0 (patch) | |
tree | 7e9e17a5c161d7d97c27fad97334a622f0c88d89 | |
parent | 960b06dd39a87a38e57ba90c4f29fea8ae65f82d (diff) | |
download | 25-new-275ccbdfac3a94a7412fcb5573b019e2d28003d0.tar.gz |
foo
-rw-r--r-- | patches/mm-always-initialise-folio-_deferred_list.patch | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/patches/mm-always-initialise-folio-_deferred_list.patch b/patches/mm-always-initialise-folio-_deferred_list.patch index a3ffe2b19..99ddd004d 100644 --- a/patches/mm-always-initialise-folio-_deferred_list.patch +++ b/patches/mm-always-initialise-folio-_deferred_list.patch @@ -23,24 +23,26 @@ deferred_list), initialise it and then we can check at free that the page is not part of a deferred list. We recently found this useful to rule out a source of corruption. +[peterx@redhat.com: always initialise folio->_deferred_list] + Link: https://lkml.kernel.org/r/20240417211836.2742593-2-peterx@redhat.com Link: https://lkml.kernel.org/r/20240321142448.1645400-1-willy@infradead.org Link: https://lkml.kernel.org/r/20240321142448.1645400-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> +Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Miaohe Lin <linmiaohe@huawei.com> Cc: Muchun Song <muchun.song@linux.dev> Cc: Oscar Salvador <osalvador@suse.de> -Cc: Peter Xu <peterx@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- mm/huge_memory.c | 2 -- mm/hugetlb.c | 3 ++- mm/internal.h | 2 ++ - mm/memcontrol.c | 2 ++ + mm/memcontrol.c | 3 +++ mm/page_alloc.c | 9 +++++---- - 5 files changed, 11 insertions(+), 7 deletions(-) + 5 files changed, 12 insertions(+), 7 deletions(-) --- a/mm/huge_memory.c~mm-always-initialise-folio-_deferred_list +++ a/mm/huge_memory.c @@ -78,11 +80,12 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org> static inline void prep_compound_tail(struct page *head, int tail_idx) --- a/mm/memcontrol.c~mm-always-initialise-folio-_deferred_list +++ a/mm/memcontrol.c -@@ -7400,6 +7400,8 @@ static void uncharge_folio(struct folio +@@ -7400,6 +7400,9 @@ static void uncharge_folio(struct folio struct obj_cgroup *objcg; VM_BUG_ON_FOLIO(folio_test_lru(folio), folio); + VM_BUG_ON_FOLIO(folio_order(folio) > 1 && ++ !folio_test_hugetlb(folio) && + !list_empty(&folio->_deferred_list), folio); /* |