lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230914140823.1732-1-justinjiang@vivo.com>
Date:   Thu, 14 Sep 2023 22:08:23 +0800
From:   Zhiguo Jiang <justinjiang@...o.com>
To:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Cc:     opensource.kernel@...o.com, Zhiguo Jiang <justinjiang@...o.com>
Subject: [PATCH] mm: mglru: fix add unevictable folio to lruvec->lists

The unevictable folio is not supported to add to lruvec->lists
in lruvec_add_folio().

So use lruvec_add_folio_tail() instead of lruvec_add_folio()
to add unevictable folio to lruvec->lists in sort_folio().

Signed-off-by: Zhiguo Jiang <justinjiang@...o.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 mm/vmscan.c

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 661615fa709b..a15e45632034
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4237,7 +4237,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, struct scan_c
 		success = lru_gen_del_folio(lruvec, folio, true);
 		VM_WARN_ON_ONCE_FOLIO(!success, folio);
 		folio_set_unevictable(folio);
-		lruvec_add_folio(lruvec, folio);
+		lruvec_add_folio_tail(lruvec, folio);
 		__count_vm_events(UNEVICTABLE_PGCULLED, delta);
 		return true;
 	}
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ