CVE-2026-99954: fs: rotate inodes whose page cache could not be dropped
In the Linux kernel, the following vulnerability has been resolved:
fs: rotate inodes whose page cache could not be dropped
When inodelruisolate() drops the page cache of an unused inode, it has to unlock the list, so it returns LRURETRY and the walk restarts at the head of the list, where the inode still is. If invalidatemappingpages() could not empty the mapping, the restarted walk strips the same inode again, and so on until nrtowalk runs out. Every walk of that list then ends on this inode, and nothing behind it is reclaimed for as long as its cache stays.
Before commit 2a0629834cd8 ("vfs: Don't evict inode under the inode lru traversing context") the walker pinned the inode with a reference, and dropping it in iputfinal() set IREFERENCED, so the restarted walk rotated the inode to the tail. Set IREFERENCED again when the mapping is still populated after the invalidation, in the same ilock section that clears ILRUISOLATING. inodeunpinlruisolating() now expects ilock to be held, like inodepinlruisolating().
On CONFIGHIGHMEM kernels this can happen to any unused inode: a folio is left behind if it is locked, under writeback, spliced into a pipe, or still in another CPU's LRU-add batch after being read. Without HIGHMEM it happens to DAX inodes whose only entry is at index 0, which mappingshrinkable() lets onto the LRU and invalidatemappingpages() never removes.