From: Helge Deller <deller@gmx.de>
To: Hillf Danton <hdanton@sina.com>
Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org
Subject: Re: WARNING: CPU: 1 PID: 14735 at fs/dcache.c:365 dentry_free+0x100/0x128
Date: Tue, 19 Jul 2022 18:32:04 +0200 [thread overview]
Message-ID: <0aa365ca-a9f0-8d15-b515-adb8823f5d28@gmx.de> (raw)
In-Reply-To: <20220717113634.1552-1-hdanton@sina.com>
Hello Hillf,
On 7/17/22 13:36, Hillf Danton wrote:
> On Sun, 17 Jul 2022 11:42:48 +0200
>> I used WARN_ON() instead of BUG_ON().
>> With that, both triggered, first the first one, then the second one.
>> Full log is here:
>> http://dellerweb.de/testcases/minicom.dcache.crash.6-warn
>
> Given the first BUG_ON triggered, and dentry at the moment is supposed to
> not be alias, see if it is still in lookup with d_lock held. That is the
> step before de-unioning d_alias with d_in_lookup_hash.
>
> On the other hand if only the second one triggered, we should track
> DCACHE_DENTRY_KILLED instead in assumption that killed dentry was
> used again after releasing d_lock surrounding the firt one.
The machine has now been up for 2 days without any issues, while it had pretty
much the same load as when it was crashing earlier.
So, in summary I'd assume that your patch below fixes the issue.
I'm now rebooting the machine with a new kernel, where I just changed
if (unlikely(d_in_lookup(dentry)))
to
if (WARN_ON_ONCE(d_in_lookup(dentry)))
in order to see if this really triggered.
Anyway, I think your patch is good so far.
Would that be the final patch, or should I test some others?
Thanks!
Helge
>
> --- a/fs/dcache.c
> +++ b/fs/dcache.c
> @@ -605,8 +605,12 @@ static void __dentry_kill(struct dentry
> spin_unlock(&parent->d_lock);
> if (dentry->d_inode)
> dentry_unlink_inode(dentry);
> - else
> + else {
> + if (unlikely(d_in_lookup(dentry))) {
> + __d_lookup_done(dentry);
> + }
> spin_unlock(&dentry->d_lock);
> + }
> this_cpu_dec(nr_dentry);
> if (dentry->d_op && dentry->d_op->d_release)
> dentry->d_op->d_release(dentry);
next prev parent reply other threads:[~2022-07-19 16:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220709090756.2384-1-hdanton@sina.com>
2022-07-15 8:18 ` WARNING: CPU: 1 PID: 14735 at fs/dcache.c:365 dentry_free+0x100/0x128 Helge Deller
[not found] ` <20220715133300.1297-1-hdanton@sina.com>
2022-07-16 5:27 ` Helge Deller
2022-07-17 9:42 ` Helge Deller
[not found] ` <20220717113634.1552-1-hdanton@sina.com>
2022-07-19 16:32 ` Helge Deller [this message]
2022-07-19 20:59 ` John David Anglin
2022-07-19 21:25 ` Helge Deller
2022-07-20 2:00 ` Al Viro
2022-07-20 2:22 ` Al Viro
2022-07-20 2:31 ` Al Viro
2022-07-20 2:33 ` Al Viro
2022-07-20 3:29 ` Al Viro
2022-07-20 6:53 ` Helge Deller
2022-07-20 7:07 ` Al Viro
2022-07-20 9:21 ` Helge Deller
[not found] ` <20220720110032.1787-1-hdanton@sina.com>
2022-07-20 17:06 ` Al Viro
2022-07-20 23:15 ` Sam James
2022-07-21 3:54 ` Helge Deller
2022-07-30 20:21 ` Helge Deller
2022-07-09 5:33 Helge Deller
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=0aa365ca-a9f0-8d15-b515-adb8823f5d28@gmx.de \
--to=deller@gmx.de \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.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