lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 13 Feb 2011 11:19:22 +0900
From:	"J. R. Okajima" <hooanon05@...oo.co.jp>
To:	Ian Kent <raven@...maw.net>
Cc:	Nick Piggin <npiggin@...il.com>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Trond Myklebust <Trond.Myklebust@...app.com>,
	Nick Piggin <npiggin@...nel.dk>, linux-nfs@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: vfs-scale, general questions (Re: NFS root lockups with -next 20110113)


Ian Kent:
> > - what is the right order of dget() and mntget()?
> >   If I remember correctly, someone said "mntget() first and then
> >   dget(). when putting, do in reverse" in the discussion when
> >   path_{get,put}() were born. So it is called "the right order" in the
> >   commit log.
> >   It was many years ago. Is it still true? And should rcu-walk follow it
> >   too? The current implementation doesn't seem to care about this order.
>
> I didn't spot that, where did you see this?
>
> I'm not sure about the get but I fairly sure the dput() has to be before
> the mntput() because the shrink_dcache_*() cleanup routines object to
> dentrys that have a reference count of more than one.

For dget - mntget, there are several such code. For example,
nameidata_dentry_drop_rcu()
{
	struct dentry *parent = nd->path.dentry;
		:::
	parent->d_count++;
	spin_unlock(&dentry->d_lock);
	spin_unlock(&parent->d_lock);
		:::
	mntget(nd->path.mnt);
		:::

But I am not sure the "get" order is a problem.
Nick Piggin also replied and said dget and mntget is not a problem, and
I replied if I found such "put" order, I would write again.


J. R. Okajima
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ