From: yangerkun <yangerkun@huawei.com>
To: <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>, <yi.zhang@huawei.com>,
<houtao1@huawei.com>, <miaoxie@huawei.com>
Subject: system panic while dentry reference count overflow
Date: Mon, 6 May 2019 11:36:10 +0800 [thread overview]
Message-ID: <af9a8dec-98a2-896f-448b-04ded0af95f0@huawei.com> (raw)
Hi,
Run process parallel which each code show as below(2T memory), reference
count of root dentry will overflow since allocation of negative dentry
should do count++ for root dentry. Then, another dput of root dentry
will free it, which cause crash of system. I wondered is there anyone
has found this problem?
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<time.h>
int main()
{
const char *forname="_dOeSnotExist_.db";
int i;
char filename[100]="";
struct timespec time1 = {0, 0};
for(;;)
{
clock_gettime(CLOCK_REALTIME, &time1);
for(i=0; i < 10000; i++) {
sprintf(filename,"/%d%d%d%s",time1.tv_sec,time1.tv_nsec,i,forname);
access(filename,0);
memset(filename,'\0',100);
}
}
return 0;
}
~
Thanks,
Kun.
next reply other threads:[~2019-05-06 3:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 3:36 yangerkun [this message]
2019-05-07 0:40 ` system panic while dentry reference count overflow 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
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=af9a8dec-98a2-896f-448b-04ded0af95f0@huawei.com \
--to=yangerkun@huawei.com \
--cc=houtao1@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=viro@zeniv.linux.org.uk \
--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 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).