mm/mglru: skip special VMAs in lru_gen_look_around()
authorYu Zhao <yuzhao@google.com>
Sat, 23 Dec 2023 04:56:47 +0000 (21:56 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 Dec 2023 19:06:48 +0000 (11:06 -0800)
commitc28ac3c7eb945fee6e20f47d576af68fdff1392a
treecc4f3f2c7355bfa6471cc2edc1c11cfc41317cf6
parent4bdd58df05cf9df0c0e43daaa83e73d77629c252
mm/mglru: skip special VMAs in lru_gen_look_around()

Special VMAs like VM_PFNMAP can contain anon pages from COW.  There isn't
much profit in doing lookaround on them.  Besides, they can trigger the
pte_special() warning in get_pte_pfn().

Skip them in lru_gen_look_around().

Link: https://lkml.kernel.org/r/20231223045647.1566043-1-yuzhao@google.com
Fixes: 018ee47f1489 ("mm: multi-gen LRU: exploit locality in rmap")
Signed-off-by: Yu Zhao <yuzhao@google.com>
Reported-by: syzbot+03fd9b3f71641f0ebf2d@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/000000000000f9ff00060d14c256@google.com/
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c