On Fri, 13 Sep 2024 16:35:04 +0800, Qiu-ji Chen wrote:
The violation of atomicity occurs when the drbd_uuid_set_bm function is executed simultaneously with modifying the value of device->ldev->md.uuid[UI_BITMAP]. Consider a scenario where, while device->ldev->md.uuid[UI_BITMAP] passes the validity check when its value is not zero, the value of device->ldev->md.uuid[UI_BITMAP] is written to zero. In this case, the check in drbd_uuid_set_bm might refer to the old value of device->ldev->md.uuid[UI_BITMAP] (before locking), which allows an invalid value to pass the validity check, resulting in inconsistency.
[...]
Applied, thanks!
[1/1] drbd: Fix atomicity violation in drbd_uuid_set_bm() commit: 2f02b5af3a4482b216e6a466edecf6ba8450fa45
Best regards,