public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	rafael@kernel.org, dakr@kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, hca@linux.ibm.com,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Xiao Ni <xni@redhat.com>
Subject: Re: [PATCH] devtmpfs: don't use vfs_getattr_nosec to query i_mode
Date: Wed, 23 Apr 2025 08:42:34 +0200	[thread overview]
Message-ID: <2025042305-timid-unusable-0501@gregkh> (raw)
In-Reply-To: <20250423-wettkampf-zahnlos-87fa8f273df7@brauner>

On Wed, Apr 23, 2025 at 07:54:51AM +0200, Christian Brauner wrote:
> On Wed, Apr 23, 2025 at 06:59:41AM +0200, Christoph Hellwig wrote:
> > The recent move of the bdev_statx call to the low-level vfs_getattr_nosec
> > helper caused it being used by devtmpfs, which leads to deadlocks in
> > md teardown due to the block device lookup and put interfering with the
> > unusual lifetime rules in md.
> > 
> > But as handle_remove only works on inodes created and owned by devtmpfs
> > itself there is no need to use vfs_getattr_nosec vs simply reading the
> > mode from the inode directly.  Switch to that to avoid the bdev lookup
> > or any other unintentional side effect.
> > 
> > Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> > Reported-by: Xiao Ni <xni@redhat.com>
> > Fixes: 777d0961ff95 ("fs: move the bdex_statx call to vfs_getattr_nosec")
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> > Tested-by: Xiao Ni <xni@redhat.com>
> > ---
> 
> Reviewed-by: Christian Brauner <brauner@kernel.org>

Do you want me to take this through the driver-core tree, or is this a
fs-specific thing as that's where the regression showed up from?  Either
is fine with me.

thanks,

greg k-h

  reply	other threads:[~2025-04-23  6:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  4:59 [PATCH] devtmpfs: don't use vfs_getattr_nosec to query i_mode Christoph Hellwig
2025-04-23  5:54 ` Christian Brauner
2025-04-23  6:42   ` Greg KH [this message]
2025-04-24  8:40     ` Christian Brauner
2025-04-23  6:45 ` Heiko Carstens
2025-04-24  5:07 ` Jain, Ayush
2025-04-24  8:41 ` Christian Brauner
2025-04-25 10:03 ` Heiko Carstens
2025-04-25 10:12   ` Christian Brauner
2025-04-25 13:32     ` Christoph Hellwig
2025-04-25 15:40       ` Kees Cook
2025-04-25 17:17         ` Nathan Chancellor
2025-04-28 13:15         ` Christoph Hellwig

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=2025042305-timid-unusable-0501@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=brauner@kernel.org \
    --cc=dakr@kernel.org \
    --cc=hca@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=xni@redhat.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