From: Christoph Hellwig <hch@lst.de>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] bcachefs: Fix sysfs warning in fstests generic/730,731
Date: Mon, 14 Oct 2024 08:10:19 +0200 [thread overview]
Message-ID: <20241014061019.GA20775@lst.de> (raw)
In-Reply-To: <20241012184239.3785089-1-kent.overstreet@linux.dev>
On Sat, Oct 12, 2024 at 02:42:39PM -0400, Kent Overstreet wrote:
> sysfs warns if we're removing a symlink from a directory that's no
> longer in sysfs; this is triggered by fstests generic/730, which
> simulates hot removal of a block device.
>
> This patch is however not a correct fix, since checking
> kobj->state_in_sysfs on a kobj owned by another subsystem is racy.
>
> A better fix would be to add the appropriate check to
> sysfs_remove_link() - and sysfs_create_link() as well.
The proper fix is to not link to random other subsystems with
object lifetimes you can't know. I'm not sure why you think adding
this link was ever allowed.
next prev parent reply other threads:[~2024-10-14 6:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 18:42 [PATCH] bcachefs: Fix sysfs warning in fstests generic/730,731 Kent Overstreet
2024-10-14 6:10 ` Christoph Hellwig [this message]
2024-10-14 6:34 ` Greg Kroah-Hartman
2024-10-14 6:51 ` Kent Overstreet
2024-10-16 7:00 ` Greg Kroah-Hartman
2024-10-16 9:49 ` Kent Overstreet
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=20241014061019.GA20775@lst.de \
--to=hch@lst.de \
--cc=gregkh@linuxfoundation.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).