On 3/6/24 19:24, Suren Baghdasaryan wrote: > When a non-compound multi-order page is freed, it is possible that a > speculative reference keeps the page pinned. In this case we free all > pages except for the first page, which will be freed later by the last > put_page(). However put_page() ignores the order of the page being freed, > treating it as a 0-order page. This creates a memory accounting imbalance > because the pages freed in __free_pages() do not have their own alloc_tag > and their memory was accounted to the first page. To fix this the first > page should adjust its allocation size counter when "tail" pages are freed. > > Reported-by: Vlastimil Babka <vba...@suse.cz> > Signed-off-by: Suren Baghdasaryan <sur...@google.com> Reviewed-by: Vlastimil Babka <vba...@suse.cz>
- [PATCH v5 14/37] lib: introduce support for page alloca... Suren Baghdasaryan
- Re: [PATCH v5 14/37] lib: introduce support for pa... Matthew Wilcox
- Re: [PATCH v5 14/37] lib: introduce support fo... Suren Baghdasaryan
- [PATCH v5 15/37] lib: introduce early boot parameter to... Suren Baghdasaryan
- Re: [PATCH v5 15/37] lib: introduce early boot par... Vlastimil Babka
- [PATCH v5 16/37] mm: percpu: increase PERCPU_MODULE_RES... Suren Baghdasaryan
- [PATCH v5 17/37] change alloc_pages name in dma_map_ops... Suren Baghdasaryan
- [PATCH v5 18/37] mm: enable page allocation tagging Suren Baghdasaryan
- [PATCH v5 19/37] mm: create new codetag references duri... Suren Baghdasaryan
- [PATCH v5 20/37] mm: fix non-compound multi-order memor... Suren Baghdasaryan
- Re: [PATCH v5 20/37] mm: fix non-compound multi-or... Vlastimil Babka
- Re: [PATCH v5 20/37] mm: fix non-compound multi-or... Matthew Wilcox
- Re: [PATCH v5 20/37] mm: fix non-compound mult... Suren Baghdasaryan
- [PATCH v5 21/37] mm/page_ext: enable early_page_ext whe... Suren Baghdasaryan
- [PATCH v5 22/37] lib: add codetag reference into slabob... Suren Baghdasaryan
- [PATCH v5 23/37] mm/slab: add allocation accounting int... Suren Baghdasaryan
- Re: [PATCH v5 23/37] mm/slab: add allocation accou... Vlastimil Babka
- Re: [PATCH v5 23/37] mm/slab: add allocation a... Suren Baghdasaryan
- Re: [PATCH v5 23/37] mm/slab: add allocati... Vlastimil Babka
- Re: [PATCH v5 23/37] mm/slab: add allo... Suren Baghdasaryan
- [PATCH v5 24/37] rust: Add a rust helper for krealloc() Suren Baghdasaryan