]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dm: fix unlocked test for dm_suspended_md
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 8 Jan 2026 19:55:08 +0000 (20:55 +0100)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 14 Jan 2026 12:12:02 +0000 (13:12 +0100)
commit24c405fdbe215c45e57bba672cc42859038491ee
treeaa801d049cb23f696ea6aec85bbaa410d755d055
parent8fbb8fe75d4cf92eaa7b21828ec39c1bf79a262f
dm: fix unlocked test for dm_suspended_md

The function dm_blk_report_zones tests if the device is suspended with
the "dm_suspended_md" call. However, this function is called without
holding any locks, so the device may be suspended just after it.

Move the call to dm_suspended_md after dm_get_live_table, so that the
device can't be suspended after the suspended state was tested.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 37f53a2c60d0 ("dm: fix dm_blk_report_zones")
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
drivers/md/dm-zone.c