CVE-2026-99644: mm/memory-tiers: unregister empty tiers outside memory_tier_lock
In the Linux kernel, the following vulnerability has been resolved:
mm/memory-tiers: unregister empty tiers outside memorytierlock
When offlining a node's last memory empties its tier, clearnodememorytier() calls deviceunregister() while holding memorytierlock. A concurrent sysfs read can hold a kernfs active reference and block in nodelistshow() on that mutex. deviceunregister() then waits in kernfsdrain() for the read to finish and release its active reference, while the reader waits for the offlining task to release the mutex.
Return the node's former tier from clearnodememorytier(), making the helper more similar to setnodememorytier(), which also returns a memorytier pointer. Let the caller unlink an empty tier under memorytierlock before rebuilding demotion targets, then unregister its device after dropping the lock.
Frequently Asked Questions
What conditions are required to trigger the deadlock?
A node must be offlined such that its last memory removal empties the node's memory tier. At the same time, a sysfs read must hold a kernfs active reference and block in nodelist_show() waiting for memory_tier_lock.
What is the impact of a successful trigger?
The node-offlining task can deadlock while unregistering the tier device. device_unregister() waits in kernfs_drain() for the sysfs read to release its active reference, while that reader is waiting for the offlining task to release memory_tier_lock.
Is a sysfs reader alone sufficient to cause the issue?
No. The problematic lock cycle requires both the concurrent sysfs read and offlining of a node whose last memory removal leaves its tier empty.