mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
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: 37f53a2c60 ("dm: fix dm_blk_report_zones")
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
This commit is contained in:
parent
24c405fdbe
commit
e9f5a55b70
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ int dm_blk_report_zones(struct gendisk *disk, sector_t sector,
|
|||
{
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue