RE: [RFC PATCH 0/2] vfs:9p: fix open-unlink-fstat bug

2020-07-19 Thread Jianyong Wu
ernel@vger.kernel.org; Kaly Xin > ; Justin He ; Wei Chen > > Subject: Re: [RFC PATCH 0/2] vfs:9p: fix open-unlink-fstat bug > > On Mon, Jul 20, 2020 at 09:46:20AM +0800, Jianyong Wu wrote: > > how to reproduce: > > in 9p guest: > > > > struct stat *statbuf; &

Re: [RFC PATCH 0/2] vfs:9p: fix open-unlink-fstat bug

2020-07-19 Thread Al Viro
On Mon, Jul 20, 2020 at 09:46:20AM +0800, Jianyong Wu wrote: > how to reproduce: > in 9p guest: > > struct stat *statbuf; > int fd; > > fd = open("tmp", O_RDWR); > unlink("tmp"); > fstat(fd, statbuf); > > fstat will fail as "tmp" in 9p server side has been removed. 9p server > can't retrieve the

[RFC PATCH 0/2] vfs:9p: fix open-unlink-fstat bug

2020-07-19 Thread Jianyong Wu
how to reproduce: in 9p guest: struct stat *statbuf; int fd; fd = open("tmp", O_RDWR); unlink("tmp"); fstat(fd, statbuf); fstat will fail as "tmp" in 9p server side has been removed. 9p server can't retrieve the file context as the guest has not passed it down. so we should pass the file info do