Linux CXL
 help / color / mirror / Atom feed
From: Gregory Price <gourry@gourry.net>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: fuse-devel@lists.linux.dev, John Groves <john@groves.net>,
	 Amir Goldstein <amir73il@gmail.com>,
	"Darrick J . Wong" <djwong@kernel.org>,
	 Vishal Verma <vishal.l.verma@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	 Alison Schofield <alison.schofield@intel.com>,
	nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Subject: Re: [PATCH v4 2/9] dax: use READ_ONCE() in dax_holder()
Date: Thu, 8 Oct 2026 09:20:23 -0400	[thread overview]
Message-ID: <aseYiJO0cgEamazq@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <20261008112004.1899560-3-mszeredi@redhat.com>

On Thu, Oct 08, 2026 at 01:19:53PM +0200, Miklos Szeredi wrote:
> A future fuse patch will utilize dax_holder() in RCU context to make sure
> that the holder can't be freed by a racing fs_put_dax.
> 
> This patch just makes sure that dax_holder() works properly in such a
> context by adding READ_ONCE() (equivalent to rcu_dereference minus sanity
> checks).
> 
> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

Reviewed-by: Gregory Price (Meta) <gourry@gourry.net>

> ---
>  drivers/dax/super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dax/super.c b/drivers/dax/super.c
> index 25836f389bde..76e8d3654629 100644
> --- a/drivers/dax/super.c
> +++ b/drivers/dax/super.c
> @@ -642,7 +642,7 @@ EXPORT_SYMBOL_GPL(put_dax);
>   */
>  void *dax_holder(struct dax_device *dax_dev)
>  {
> -	return dax_dev->holder_data;
> +	return READ_ONCE(dax_dev->holder_data);
>  }
>  EXPORT_SYMBOL_GPL(dax_holder);
>  
> -- 
> 2.54.0
> 

  parent reply	other threads:[~2026-10-08 13:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 11:19 [PATCH v4 0/9] fuse: DAX device based extent maps (famfs) Miklos Szeredi
2026-10-08 11:19 ` [PATCH v4 1/9] dax: add fsdev_dax_from_file() Miklos Szeredi
2026-10-08 11:34   ` sashiko-bot
2026-10-08 11:19 ` [PATCH v4 2/9] dax: use READ_ONCE() in dax_holder() Miklos Szeredi
2026-10-08 11:32   ` sashiko-bot
2026-10-08 13:20   ` Gregory Price [this message]
2026-10-08 11:19 ` [PATCH v4 3/9] fuse: add helpers for EIO return value with kernel message Miklos Szeredi
2026-10-08 11:19 ` [PATCH v4 4/9] fuse: support 64 bit, server allocated backing ID Miklos Szeredi
2026-10-09  7:36   ` Amir Goldstein
2026-10-08 11:19 ` [PATCH v4 5/9] fuse: support opening 64 bit " Miklos Szeredi
2026-10-08 11:19 ` [PATCH v4 6/9] fuse: add support for opening dax device as backing Miklos Szeredi
2026-10-08 11:34   ` sashiko-bot
2026-10-08 11:19 ` [PATCH v4 7/9] fuse: add extent map data structure Miklos Szeredi
2026-10-08 11:19 ` [PATCH v4 8/9] fuse: add extent map I/O support Miklos Szeredi
2026-10-08 11:36   ` sashiko-bot
2026-10-08 11:20 ` [PATCH v4 9/9] fuse: add support for striped backing Miklos Szeredi

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=aseYiJO0cgEamazq@gourry-fedora-PF4VCD3F \
    --to=gourry@gourry.net \
    --cc=alison.schofield@intel.com \
    --cc=amir73il@gmail.com \
    --cc=dave.jiang@intel.com \
    --cc=djwong@kernel.org \
    --cc=fuse-devel@lists.linux.dev \
    --cc=john@groves.net \
    --cc=linux-cxl@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox