From: Benjamin Marzinski <bmarzins@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
dm-devel@lists.linux.dev
Subject: Re: [PATCH] dm: use READ_ONCE in dm_blk_report_zones
Date: Thu, 8 Jan 2026 15:42:01 -0500 [thread overview]
Message-ID: <aWAWmUhL_DyNtVd-@redhat.com> (raw)
In-Reply-To: <f99c02cf-8d0a-964d-c52b-a9a38c44ba73@redhat.com>
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 <mpatocka@redhat.com>
> Fixes: 37f53a2c60d0 ("dm: fix dm_blk_report_zones")
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
>
> ---
> 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;
>
prev parent reply other threads:[~2026-01-08 20:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 19:56 [PATCH] dm: use READ_ONCE in dm_blk_report_zones Mikulas Patocka
2026-01-08 20:42 ` Benjamin Marzinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWAWmUhL_DyNtVd-@redhat.com \
--to=bmarzins@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.