Re: [PATCH 04/22][RFC] Unionfs: Common file operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 01, 2006 at 06:20:00PM -0400, Trond Myklebust wrote:
> On Thu, 2006-08-31 at 21:41 -0400, Josef Sipek wrote:
...
> > +	for (bindex = bstart; bindex <= bend; bindex++) {
> > +		hidden_dentry = dtohd_index(file->f_dentry, bindex);
> > +		if (!hidden_dentry)
> > +			continue;
> > +
> > +		dget(hidden_dentry);
> > +		mntget(stohiddenmnt_index(inode->i_sb, bindex));
> > +		hidden_file = dentry_open(hidden_dentry,
> > +					stohiddenmnt_index(inode->i_sb, bindex),
> > +					file->f_flags);
> 
> Race! You cannot open an underlying NFS file by name after it has been
> looked up: you have no guarantee that it hasn't been renamed.

>From what I can see, the solution to this would be to pass the lookup
intents in unionfs_lookup down to the lower filesystem (the way it should be
done in the first place). Then, we could use the dentry here without any
problems. Is that all that needs to be done or am I forgetting something?

Thanks,

Josef "Jeff" Sipek.

-- 
VGER BF report: H 0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux