system panic while dentry reference count overflow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: <viro@xxxxxxxxxxxxxxxxxx>
- Subject: system panic while dentry reference count overflow
- From: yangerkun <yangerkun@xxxxxxxxxx>
- Date: Mon, 6 May 2019 11:36:10 +0800
- Cc: <linux-fsdevel@xxxxxxxxxxxxxxx>, <yi.zhang@xxxxxxxxxx>, <houtao1@xxxxxxxxxx>, <miaoxie@xxxxxxxxxx>
- User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
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.
[Index of Archives]
[Linux Ext4 Filesystem]
[Union Filesystem]
[Filesystem Testing]
[Ceph Users]
[Ecryptfs]
[AutoFS]
[Kernel Newbies]
[Share Photos]
[Security]
[Netfilter]
[Bugtraq]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux Cachefs]
[Reiser Filesystem]
[Linux RAID]
[Samba]
[Device Mapper]
[CEPH Development]