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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:17:00 +0000 (17:17 +0100)
commite73022d600175f2d88010438b91897c624e33c64
tree487ef8f948dbe74ed94a98d603d5e20fefc5f673
parent22c8e0b87bcb03c9310c4a9e0781a77d1d2dfc8a
mm/mglru: skip special VMAs in lru_gen_look_around()

commit c28ac3c7eb945fee6e20f47d576af68fdff1392a upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/vmscan.c