Re: [PATCH 4/7] dm: fix dm_blk_report_zones

Damien Le Moal
2025-03-09T23:27:24Z

On 3/10/25 07:29, Benjamin Marzinski wrote:
> If dm_get_live_table() returned NULL, dm_put_live_table() was never
> called. Also, if md->zone_revalidate_map is set, check that
> dm_blk_report_zones() is being called from the process that set it in
> __bind(). Otherwise the zone resources could change while accessing
> them. Finally, it is possible that md->zone_revalidate_map will change
> while calling this function. Only read it once, so that we are always
> using the same value. Otherwise we might miss a call to
> dm_put_live_table().
>
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>

Looks good to me.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

--
Damien Le Moal
Western Digital Research