Patch "mm/page_alloc: always remove pages from temporary list" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mm/page_alloc: always remove pages from temporary list

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-page_alloc-always-remove-pages-from-temporary-lis.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9d8e793d000a5f5b70e270f999cc52c2dd78b5cd
Author: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Date:   Fri Nov 18 10:17:13 2022 +0000

    mm/page_alloc: always remove pages from temporary list
    
    [ Upstream commit c3e58a70425ac6ddaae1529c8146e88b4f7252bb ]
    
    Patch series "Leave IRQs enabled for per-cpu page allocations", v3.
    
    This patch (of 2):
    
    free_unref_page_list() has neglected to remove pages properly from the
    list of pages to free since forever.  It works by coincidence because
    list_add happened to do the right thing adding the pages to just the PCP
    lists.  However, a later patch added pages to either the PCP list or the
    zone list but only properly deleted the page from the list in one path
    leading to list corruption and a subsequent failure.  As a preparation
    patch, always delete the pages from one list properly before adding to
    another.  On its own, this fixes nothing although it adds a fractional
    amount of overhead but is critical to the next patch.
    
    Link: https://lkml.kernel.org/r/20221118101714.19590-1-mgorman@xxxxxxxxxxxxxxxxxxx
    Link: https://lkml.kernel.org/r/20221118101714.19590-2-mgorman@xxxxxxxxxxxxxxxxxxx
    Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
    Reported-by: Hugh Dickins <hughd@xxxxxxxxxx>
    Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
    Cc: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
    Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
    Cc: Michal Hocko <mhocko@xxxxxxxxxx>
    Cc: Yu Zhao <yuzhao@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: 7b086755fb8c ("mm: page_alloc: fix CMA and HIGHATOMIC landing on the wrong buddy list")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 69668817fed37..d94ac6d87bc97 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3547,6 +3547,8 @@ void free_unref_page_list(struct list_head *list)
 	list_for_each_entry_safe(page, next, list, lru) {
 		struct zone *zone = page_zone(page);
 
+		list_del(&page->lru);
+
 		/* Different zone, different pcp lock. */
 		if (zone != locked_zone) {
 			if (pcp)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux