summaryrefslogtreecommitdiffstats
path: root/mm/madvise.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2022-09-26 22:13:15 +0200
committerAndrew Morton <akpm@linux-foundation.org>2022-09-26 22:13:15 +0200
commit6d751329e761338faa9c24c2c9736f27bc54282b (patch)
tree6e1778a7448552c58d12da88f70f6ad2718d55da /mm/madvise.c
parentmm: fix PageAnonExclusive clearing racing with concurrent RCU GUP-fast (diff)
parentx86/uaccess: avoid check_object_size() in copy_from_user_nmi() (diff)
downloadlinux-6d751329e761338faa9c24c2c9736f27bc54282b.tar.xz
linux-6d751329e761338faa9c24c2c9736f27bc54282b.zip
Merge branch 'mm-hotfixes-stable' into mm-stable
Diffstat (limited to 'mm/madvise.c')
-rw-r--r--mm/madvise.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/madvise.c b/mm/madvise.c
index af97100a0727..4f86eb7f554d 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -452,8 +452,11 @@ regular_page:
continue;
}
- /* Do not interfere with other mappings of this page */
- if (page_mapcount(page) != 1)
+ /*
+ * Do not interfere with other mappings of this page and
+ * non-LRU page.
+ */
+ if (!PageLRU(page) || page_mapcount(page) != 1)
continue;
VM_BUG_ON_PAGE(PageTransCompound(page), page);