Re: [PATCH] drbd: Fix atomicity violation in drbd_uuid_set_bm()
Jens Axboe <[email protected]> Wed, 18 Sep 2024 04:17:06 -0600
| Newsgroups | dev.linux.lists.drbd-dev,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
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,
--
Jens Axboe