{"id":"CVE-2026-98924","title":"fs: avoid repeated scans in evict_inodes()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs: avoid repeated scans in evict_inodes()\n\nWe observed hung tasks when users attempted to unmount a filesystem\nafter its disk had been removed while still in use. Duri…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= ac05fbb40062411ea1b722aa2cede7feaa94f1b4 < e4f3e476cd4066a815ef68cd6caa1828b9c167d5","Linux >= ac05fbb40062411ea1b722aa2cede7feaa94f1b4 < 3cdc6e12ff79f0f8a3ba62d7e61474ae4b5e119a","Linux >= ac05fbb40062411ea1b722aa2cede7feaa94f1b4 < 7459c021874246c196f397686e100702f059b9e7","Linux 4.3"],"published":"2026-10-23","updated":"2026-10-23","sourceUpdated":"2026-10-23T12:05:50.501Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-98924","references":[{"url":"https://git.kernel.org/stable/c/e4f3e476cd4066a815ef68cd6caa1828b9c167d5"},{"url":"https://git.kernel.org/stable/c/3cdc6e12ff79f0f8a3ba62d7e61474ae4b5e119a"},{"url":"https://git.kernel.org/stable/c/7459c021874246c196f397686e100702f059b9e7"}],"tags":["cve.org"],"ingestedAt":"2026-10-23T13:24:55.567Z","slug":"CVE-2026-98924","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nfs: avoid repeated scans in evict_inodes()\n\nWe observed hung tasks when users attempted to unmount a filesystem\nafter its disk had been removed while still in use. During device\nremoval, fs_bdev_mark_dead() calls evict_inodes() while holding s_umount.\n\nEach time evict_inodes() drops s_inode_list_lock to reschedule, it\nrestarts the walk from the head of s_inodes. With many referenced inodes\nat the head of the list, these restarts repeatedly scan the same inodes\nwithout reclaiming them. This can keep s_umount held for a long time,\nblocking concurrent umount attempts and triggering hung-task reports.\n\nKeep the current inode, already marked I_FREEING, out of the disposal\nbatch until s_inode_list_lock is reacquired. Resume the walk from this\ninode and dispose of it in a later batch or at the end of the walk.\n\nThe zero-refcount and state checks under i_lock allow this walker to\nclaim the inode by setting I_FREEING and removing it from the LRU.\nOther reclaimers skip the inode, leaving this walker responsible for\neviction. Only evict() removes it from s_inodes, so keeping it out of\nthe disposal batch ensures that it remains on the list while the lock\nis dropped. After reacquiring the lock, reading its current next pointer\naccounts for concurrent removal of following inodes.\n\nThe existing inode lifetime rules prohibit acquiring a reference to an\ninode marked I_FREEING or I_WILL_FREE. __iget() requires its caller to\nhold i_lock and establish that taking a reference is valid. Inode lookup\nand igrab() check these flags under i_lock when acquiring a reference\nfrom zero. ihold() requires an existing reference, which would keep\ni_count nonzero and prevent this walker from claiming the inode. These\nrules already allow iput_final() and the inode shrinker to release\ni_lock after setting I_FREEING and before eviction completes.\n\nA temporary __iget() reference would also keep the inode on the list,\nbut its release must preserve last-reference handling. Another user can\nacquire a reference, update lazy timestamps and drop its reference while\nthe pin is held. If the pin becomes the last reference, dropping it with\natomic_dec_and_test() and evicting directly bypasses iput()'s lazytime\nhandling and can lose those timestamp updates.\n\nReleasing the pin with iput() preserves that handling, but does not\nguarantee eviction. fs_bdev_mark_dead() runs with SB_ACTIVE set, so iput()\nmay retain the inode in cache, whereas evict_inodes() must evict eligible\nzero-reference inodes. The inode may also have been freed when iput()\nreturns, so the walker cannot then use it to force eviction. Using\nI_FREEING preserves the existing eviction behavior without introducing\nan additional last-reference transition.\n\nThe xfstests auto group passed on ext4 and XFS with known unrelated\nfailures excluded. No new issues were observed, and the previously\nreproducible hung task no longer occurs with this patch.\n\n## Affected\n\n- `Linux >= ac05fbb40062411ea1b722aa2cede7feaa94f1b4 < e4f3e476cd4066a815ef68cd6caa1828b9c167d5`\n- `Linux >= ac05fbb40062411ea1b722aa2cede7feaa94f1b4 < 3cdc6e12ff79f0f8a3ba62d7e61474ae4b5e119a`\n- `Linux >= ac05fbb40062411ea1b722aa2cede7feaa94f1b4 < 7459c021874246c196f397686e100702f059b9e7`\n- `Linux 4.3`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}