From: Al Viro <viro@zeniv.linux.org.uk>
To: Fam Zheng <zhengfeiran@bytedance.com>
Cc: linux-fsdevel@vger.kernel.org, "Fam Zheng" <fam@euphon.net>,
段熊春 <duanxiongchun@bytedance.com>,
"Shine Liu" <liuxian.1@bytedance.com>
Subject: Re: d_add and dentry leak
Date: Thu, 21 Feb 2019 08:30:35 +0000 [thread overview]
Message-ID: <20190221083034.GA2217@ZenIV.linux.org.uk> (raw)
In-Reply-To: <88C84EC4-6B70-455E-9203-A6DB398D3FA4@bytedance.com>
On Thu, Feb 21, 2019 at 03:45:06PM +0800, Fam Zheng wrote:
> We’ve noticed an issue that frequent open,close,open,close... of /dev/ptmx eventually causes soft lockup.
>
> Here is a summary of what happened.
>
> Upon user opening /dev/ptmx, devpts_pty_new calls d_alloc_name and d_add, the new dentry is inserted into dcache_hashtable.
>
> Later when closing, devpts_pty_kill calls d_delete and dput,
... since it looks like a normal negative dentry, to be eventually
evicted upon memory pressure. That's not the worst problem in
there, actually - consider
touch /tmp/a
mount --bind /tmp/a /dev/pts/<number>
followed by devpts_pty_kill() taking that sucker out...
next prev parent reply other threads:[~2019-02-21 8:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 7:45 d_add and dentry leak Fam Zheng
2019-02-21 8:30 ` Al Viro [this message]
2019-02-21 9:13 ` Fam Zheng
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=20190221083034.GA2217@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=duanxiongchun@bytedance.com \
--cc=fam@euphon.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=liuxian.1@bytedance.com \
--cc=zhengfeiran@bytedance.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;
as well as URLs for NNTP newsgroup(s).