From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Cc: Nicolai Stange <nicstange@gmail.com>
Subject: Re: 6.7.0-rc1 + hacks deadlock bug, wifi netdev delete + cat of debugfs file.
Date: Wed, 08 Nov 2023 21:06:55 +0100 [thread overview]
Message-ID: <8276773301ab22811283012be1c0fc2645f680c3.camel@sipsolutions.net> (raw)
In-Reply-To: <91f66433-7eb9-4916-953e-6587f9ff5944@candelatech.com>
On Wed, 2023-11-08 at 12:04 -0800, Ben Greear wrote:
> On 11/8/23 10:43, Johannes Berg wrote:
> > On Wed, 2023-11-08 at 09:44 -0800, Ben Greear wrote:
> > >
> > > This method appears to actually set a S_DEAD flag in the dentry,
> > >
> >
> > A *dir* entry.
> >
> > > so maybe
> > > we just check that flag in the mutex_trylock failed to acquire path
> > > in the debugfs read?
> > >
> > > void simple_recursive_removal(struct dentry *dentry,
> > > void (*callback)(struct dentry *))
> > > {
> > > struct dentry *this = dget(dentry);
> > > while (true) {
> > > struct dentry *victim = NULL, *child;
> > > struct inode *inode = this->d_inode;
> > >
> > > inode_lock(inode);
> > > if (d_is_dir(this))
> > > inode->i_flags |= S_DEAD;
> > >
> >
> > But even if you did that, I'm not sure what you'd do? trylock and sleep,
> > and abort if you find it's being removed? That all sounds super awkward.
>
> Here is my compile-only tested approach. It only tries to fix one particular
> locking case in debugfs, so I'm sure it is not yet complete. I believe I
> need to add that new flag in the fs.h, as S_DEAD is only for directories,
> if I understand the code properly.
[snip code]
Sure, it's just software. You can do whatever you want with it. But ...
there's no way anything even similar to this will ever go upstream.
johannes
next prev parent reply other threads:[~2023-11-08 20:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 22:08 6.7.0-rc1 + hacks deadlock bug, wifi netdev delete + cat of debugfs file Ben Greear
2023-11-08 10:31 ` Johannes Berg
2023-11-08 15:07 ` Ben Greear
2023-11-08 15:44 ` Johannes Berg
2023-11-08 15:55 ` Ben Greear
2023-11-08 16:07 ` Johannes Berg
2023-11-08 17:39 ` Benjamin Berg
2023-11-08 17:46 ` Ben Greear
2023-11-08 17:44 ` Ben Greear
2023-11-08 18:43 ` Johannes Berg
2023-11-08 20:04 ` Ben Greear
2023-11-08 20:06 ` Johannes Berg [this message]
2023-11-08 16:21 ` Johannes Berg
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=8276773301ab22811283012be1c0fc2645f680c3.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nicstange@gmail.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