Merge tag 'kgdb-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt...
[platform/kernel/linux-rpi.git] / mm / mmzone.c
index d8a9b0e..0ae7571 100644 (file)
@@ -81,6 +81,13 @@ void lruvec_init(struct lruvec *lruvec)
 
        for_each_lru(lru)
                INIT_LIST_HEAD(&lruvec->lists[lru]);
+       /*
+        * The "Unevictable LRU" is imaginary: though its size is maintained,
+        * it is never scanned, and unevictable pages are not threaded on it
+        * (so that their lru fields can be reused to hold mlock_count).
+        * Poison its list head, so that any operations on it would crash.
+        */
+       list_del(&lruvec->lists[LRU_UNEVICTABLE]);
 }
 
 #if defined(CONFIG_NUMA_BALANCING) && !defined(LAST_CPUPID_NOT_IN_PAGE_FLAGS)