Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm: use READ_ONCE in dm_blk_report_zones

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 <mpatocka@redhat.com>
Fixes: 37f53a2c60d0 ("dm: fix dm_blk_report_zones")
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>

+1 -1
+1 -1
drivers/md/dm-zone.c
··· 50 50 { 51 51 struct mapped_device *md = disk->private_data; 52 52 struct dm_table *map; 53 - struct dm_table *zone_revalidate_map = md->zone_revalidate_map; 53 + struct dm_table *zone_revalidate_map = READ_ONCE(md->zone_revalidate_map); 54 54 int srcu_idx, ret = -EIO; 55 55 bool put_table = false; 56 56