On Thu, Jan 08, 2026 at 08:56:20PM +0100, Mikulas Patocka wrote: > The functon dm_blk_report_zones reads md->zone_revalidate_map, however it > may change while the function is running. Use READ_ONCE. > > Signed-off-by: Mikulas Patocka <[email protected]> > Fixes: 37f53a2c60d0 ("dm: fix dm_blk_report_zones")
Reviewed-by: Benjamin Marzinski <[email protected]> > > --- > drivers/md/dm-zone.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-2.6/drivers/md/dm-zone.c > =================================================================== > --- linux-2.6.orig/drivers/md/dm-zone.c 2026-01-06 22:57:00.000000000 > +0100 > +++ linux-2.6/drivers/md/dm-zone.c 2026-01-06 22:57:00.000000000 +0100 > @@ -50,7 +50,7 @@ int dm_blk_report_zones(struct gendisk * > { > struct mapped_device *md = disk->private_data; > struct dm_table *map; > - struct dm_table *zone_revalidate_map = md->zone_revalidate_map; > + struct dm_table *zone_revalidate_map = > READ_ONCE(md->zone_revalidate_map); > int srcu_idx, ret = -EIO; > bool put_table = false; >
