From: Shakeel Butt Date: Wed, 29 May 2024 15:49:11 +0000 (-0700) Subject: mm: vmscan: reset sc->priority on retry X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=462966dc7d701b5c251f280e1c90e8fd301f11e3;p=users%2Fdwmw2%2Flinux.git mm: vmscan: reset sc->priority on retry The commit 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") added a retry reclaim heuristic to iterate all the cgroups before returning an unsuccessful reclaim but missed to reset the sc->priority. Let's fix it. Link: https://lkml.kernel.org/r/20240529154911.3008025-1-shakeel.butt@linux.dev Fixes: 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") Signed-off-by: Shakeel Butt Reported-by: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Tested-by: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton --- diff --git a/mm/vmscan.c b/mm/vmscan.c index a72864b4b620c..d1a87ceef0dce 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -6304,6 +6304,7 @@ retry: * meaningful forward progress. Avoid false OOMs in this case. */ if (!sc->memcg_full_walk) { + sc->priority = initial_priority; sc->memcg_full_walk = 1; goto retry; }