Re: [PATCH v2] fail dentry revalidation after namespace change

2012-07-09 Thread Andrew Morton
On Mon, 09 Jul 2012 18:51:37 -0700 ebied...@xmission.com (Eric W. Biederman) wrote: > Andrew Morton writes: > > > On Mon, 09 Jul 2012 17:30:48 -0700 ebied...@xmission.com (Eric W. > > Biederman) wrote: > > > >> Andrew Morton writes: > >> > >> >> { > >> >> struct sysfs_dirent *sd; >

Re: [PATCH v2] fail dentry revalidation after namespace change

2012-07-09 Thread Eric W. Biederman
Andrew Morton writes: > On Mon, 09 Jul 2012 17:30:48 -0700 ebied...@xmission.com (Eric W. Biederman) > wrote: > >> Andrew Morton writes: >> >> >> { >> >> struct sysfs_dirent *sd; >> >> int is_dir; >> >> + int type; >> >> >> >> if (nd->flags & LOOKUP_RCU) >> >> return -ECHILD

Re: [PATCH v2] fail dentry revalidation after namespace change

2012-07-09 Thread Andrew Morton
On Mon, 09 Jul 2012 17:30:48 -0700 ebied...@xmission.com (Eric W. Biederman) wrote: > Andrew Morton writes: > > >> { > >>struct sysfs_dirent *sd; > >>int is_dir; > >> + int type; > >> > >>if (nd->flags & LOOKUP_RCU) > >>return -ECHILD; > >> @@ -326,6 +327,13 @@ stati

Re: [PATCH v2] fail dentry revalidation after namespace change

2012-07-09 Thread Eric W. Biederman
Andrew Morton writes: >> { >> struct sysfs_dirent *sd; >> int is_dir; >> +int type; >> >> if (nd->flags & LOOKUP_RCU) >> return -ECHILD; >> @@ -326,6 +327,13 @@ static int sysfs_dentry_revalidate(struct dentry >> *dentry, struct nameidata *nd) >> if (strcm

Re: [PATCH v2] fail dentry revalidation after namespace change

2012-07-09 Thread Serge Hallyn
Quoting Andrew Morton (a...@linux-foundation.org): > On Fri, 6 Jul 2012 13:09:07 +0400 > Glauber Costa wrote: > > > When we change the namespace tag of a sysfs entry, the associated dentry > > is still kept around. readdir() will work correctly and not display the > > old entries, but open() wil

Re: [PATCH v2] fail dentry revalidation after namespace change

2012-07-09 Thread Andrew Morton
On Fri, 6 Jul 2012 13:09:07 +0400 Glauber Costa wrote: > When we change the namespace tag of a sysfs entry, the associated dentry > is still kept around. readdir() will work correctly and not display the > old entries, but open() will still succeed, so will reads and writes. > > This will no lo