From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: yangerkun <yangerkun@huawei.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
yi.zhang@huawei.com, houtao1@huawei.com, miaoxie@huawei.com
Subject: Re: system panic while dentry reference count overflow
Date: Tue, 7 May 2019 20:55:03 +0100 [thread overview]
Message-ID: <20190507195503.GJ23075@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAHk-=whbaKc+5HvXypMTrS9qGzL=QCuY9U_27Yo8=bHC6BpDsg@mail.gmail.com>
On Tue, May 07, 2019 at 12:23:23PM -0700, Linus Torvalds wrote:
> On Tue, May 7, 2019 at 12:16 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > Negative ->d_lockref.count are used for "lockref is dead"...
>
> We can change that to just -1, can't we? It's equally easy to test for.
Provided that lockref.c is updated accordingly (look at e.g.
lockref_get_not_zero()).
> Those aren't supposed to be incremented anyway, which is the whole point.
>
> But we could do what the page refs also did: consider refcounts in the
> "small negative range" to be very special, because they are either
> critically close to an overflow, or they are actually a sign of a
> fatal underflow due to some bug. And make one of those be the dead
> marker.
lockref_get_not_zero() hitting dead dentry is not abnormal,
so we'd better not complain in such case... BTW, wouldn't that WARN_ON()
in dget() belong in lockref_get()?
next prev parent reply other threads:[~2019-05-07 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 3:36 system panic while dentry reference count overflow yangerkun
2019-05-07 0:40 ` Al Viro
2019-05-07 1:50 ` Linus Torvalds
2019-05-07 4:15 ` Al Viro
2019-05-07 15:26 ` Linus Torvalds
2019-05-07 19:16 ` Al Viro
2019-05-07 19:23 ` Linus Torvalds
2019-05-07 19:55 ` Al Viro [this message]
2019-05-07 20:47 ` Linus Torvalds
2019-05-07 21:14 ` Al Viro
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=20190507195503.GJ23075@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=houtao1@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=torvalds@linux-foundation.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.