In the Linux kernel, the following vulnerability has been resolved: scsi: scsi_debug: Take the zone metadata lock before the data lock resp_comp_write() takes the data lock and then the zone metadata lock, while every other command that takes both takes the metadata lock first and reaches the data lock through do_device_access(). A COMPARE AND WRITE and any other write to the same store can therefore deadlock each other. Take the locks in the same order as everywhere else. Correct the comment above map_region() while here: the provisioning map is covered by the metadata lock rather than the data lock, which is why resp_unmap() takes only the metadata lock.
https://git.kernel.org/stable/c/c9aedbcbff0fe31fabdea09600609eb30e05441d
https://git.kernel.org/stable/c/8accbdee95c2b0423eea568990e20fee07a15400
https://git.kernel.org/stable/c/4eba94e6c42a9f0d2a64be82d933de640ec9da0f
https://git.kernel.org/stable/c/326123fcbda92a1e1abd61da524e2b9bd4b58259