CVE-2021-46921: In the Linux kernel, the following vulnerability has been resolved: locking/qrwlock: Fix ordering in queued_write_lock_
Summary
A vulnerability in the Linux kernel's queued read-write lock mechanism allowed a race condition where a reader could modify a value while a writer thought it had acquired the lock. The problem occurred because the writer's lock acquisition wasn't properly ordered with respect to the atomic compare-and-exchange operation (cmpxchg, a CPU instruction that compares and swaps values atomically), creating a window where reads could see stale data before the write lock was truly secured.
Solution / Mitigation
Switching the cmpxchg to use acquire semantics (memory ordering guarantees that prevent certain CPU operations from being reordered) addresses the issue. After this change, the atomic_cond_read can be switched to use relaxed semantics (a faster version without strict ordering guarantees), as the cmpxchg now provides the necessary ordering.
Vulnerability Details
5.5(medium)
EPSS: 0.0%
Classification
Taxonomy References
Original source: https://nvd.nist.gov/vuln/detail/CVE-2021-46921
First tracked: February 15, 2026 at 08:35 PM
Classified by LLM (prompt v3) · confidence: 95%