dm cache: fix issue with background work locking

State
Published
Severity
Not Scored
Published
Nov 3, 2026
Updated
Nov 3, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

dm cache: fix issue with background work locking

dm cache used a rw_semaphore for background_work_lock. Write locks on rw_semaphores have strict owner semantics, but there was no guarantee that the process that locked background_work_lock was the same process that unlocked it. This can be easily seen using a kernel compiled with CONFIG_DEBUG_RWSEMS. Given a dm cache device <cache>, run: 'dmsetup suspend <cache> && dmsetup resume <cache>'. This will trigger a kernel warning:

DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE))

triggered by cache_resume(). To fix this, switch from a rw_semaphore to a spinlock and a wait queue. dm cache already has a wait queue and associated counter, migration_wait and nr_allocated_migrations, that was getting woken up when background work was getting completed, but wasn't actually used by anything. This is replaced by the background_work queue and counter.

ProductVersions
Linux Linuxb29d4986d0da1a27cd35917cdb433672f5c95d7f to before 0c7a8cad7c96012a9157a189649e569d0390f384 Affectedb29d4986d0da1a27cd35917cdb433672f5c95d7f to before f5db935d257023c3ef410bd39163b949b0e5a55d Affectedb29d4986d0da1a27cd35917cdb433672f5c95d7f to before 6290507ecc0dd6dd40759729cbbbd49b1d2a63c4 Affectedb29d4986d0da1a27cd35917cdb433672f5c95d7f to before 8433fd005c25fd127021f67c9144a879fb585572 Affectedb29d4986d0da1a27cd35917cdb433672f5c95d7f to before 2f2cfa16dd0f4179bb988139dd37d00a42324f6c Affectedb29d4986d0da1a27cd35917cdb433672f5c95d7f to before 73df2ff409f3db95029982fe3656329568e3715d Affectedb29d4986d0da1a27cd35917cdb433672f5c95d7f to before 104f09e02038b0fc6bbb718b3976af029e15c1d0 Affectedb29d4986d0da1a27cd35917cdb433672f5c95d7f to before bc9781c0247de107876f32929f1637db93a42b34 Affected
Linux Linux4.12 Affectedbefore 4.12 Not Affected5.10.273 through 5.10.* Not Affected5.15.224 through 5.15.* Not Affected6.1.191 through 6.1.* Not Affected6.6.161 through 6.6.* Not Affected6.12.115 through 6.12.* Not Affected6.18.59 through 6.18.* Not Affected7.2.13 through 7.2.* Not Affected7.3 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.