linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Delalande <colona@arista.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
	Omar Sandoval <osandov@osandov.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] vfs: Fix, simpliy and stop using d_dname for the /proc/*/ns/* files.
Date: Sat, 6 Jun 2015 22:08:28 +0200	[thread overview]
Message-ID: <20150606200828.GR22078@ycc.fr> (raw)
In-Reply-To: <87pp58wsbn.fsf@x220.int.ebiederm.org>

On Sat, Jun 06, 2015 at 02:27:24PM -0500, Eric W. Biederman wrote:
> Ivan Delalande <colona@arista.com> writes:
> 
> > On Thu, May 21, 2015 at 12:23:25AM +0100, Al Viro wrote:
> >> On Wed, May 20, 2015 at 05:05:30PM -0500, Eric W. Biederman wrote:
> >> > -	dentry = d_alloc_pseudo(mnt->mnt_sb, &qname);
> >> > +	dentry = d_alloc_name(mnt->mnt_root, name);
> >> >  	if (!dentry) {
> >> >  		iput(inode);
> >> >  		mntput(mnt);
> >> >  		return ERR_PTR(-ENOMEM);
> >> >  	}
> >> > -	d_instantiate(dentry, inode);
> >> > +	d_add(dentry, inode);
> >> 
> >> Careful - that might have non-trivial effects.  Namely, you are making
> >> the root dentry of that sucker a contention point and adding to hash
> >> pollution...  It's probably not going to cause visible problems, but
> >> it's worth profiling just to be sure.
> >> 
> >> Besides, you are violating a bunch of rules here - several hashed
> >> children of the same directory with the same name all at once...
> >> not nice.
> >
> > Hey Eric, did you have any thought about Al’s concerns?
> 
> Massive difference in perspective for the most part.  It did cause me to
> step back and really look at what that code is doing and why.
> 
> For the immediate problem the issue is that the WARN_ON is warning about
> something nothing in the kernel has done for 5 years and in practice as
> you have seen is actually wrong.  So deleting the warning message
> appears the best way to handle the situation you are seeing.

Ok, great. Thanks for all the info and the new patch, Eric.

-- 
Ivan "Colona" Delalande
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2015-06-06 20:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 18:58 Warning: empty root dentry name after lazy mount removal Ivan Delalande
2015-05-20 10:05 ` Omar Sandoval
2015-05-20 22:05   ` [PATCH] vfs: Fix, simpliy and stop using d_dname for the /proc/*/ns/* files Eric W. Biederman
2015-05-20 23:00     ` Omar Sandoval
2015-05-20 23:08     ` Ivan Delalande
2015-05-20 23:23     ` Al Viro
2015-06-03 20:51       ` Ivan Delalande
2015-06-06 19:27         ` Eric W. Biederman
2015-06-06 19:30           ` [PATCH] vfs: Remove incorrect debugging WARN in prepend_path Eric W. Biederman
2015-06-06 20:08           ` Ivan Delalande [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150606200828.GR22078@ycc.fr \
    --to=colona@arista.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=osandov@osandov.com \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).