linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* system panic while dentry reference count overflow
@ 2019-05-06  3:36 yangerkun
  2019-05-07  0:40 ` Al Viro
  0 siblings, 1 reply; 10+ messages in thread
From: yangerkun @ 2019-05-06  3:36 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, yi.zhang, houtao1, miaoxie

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-05-07 21:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-05-07 20:47               ` Linus Torvalds
2019-05-07 21:14                 ` Al Viro

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).