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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26799.1277185756@jrobl>
Date:	Tue, 22 Jun 2010 14:49:16 +0900
From:	"J. R. Okajima" <hooanon05@...oo.co.jp>
To:	Ian Kent <raven@...maw.net>
Cc:	Miklos Szeredi <miklos@...redi.hu>, viro@...iv.linux.org.uk,
	vaurora@...hat.com, autofs@...ux.kernel.org,
	linux-kernel@...r.kernel.org, hch@...radead.org,
	linux-fsdevel@...r.kernel.org, jblunck@...e.de
Subject: Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's vfsmount in super block info


Ian Kent:
> +static vfsmount *autofs4_find_vfsmount(struct path *parent, struct dentry *root)
> +{
> +	struct vfsmount *mnt = NULL;
> +	struct dentry *child;
> +
> +	spin_lock(&dcache_lock);
> +	list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) {

dentry->d_subdirs?
parent->dentry->...?

Or how about iterate_mounts() instead of loop over dentries?
For example (just a example),

struct args {
	/* input */
	struct dentry *root;

	/* output */
	struct vfsmount *mnt;
};

static int compare_mnt(struct vfsmount *mnt, void *arg)
{
	struct args *a = arg;

	if (mnt->mnt_root != a->root)
		return 0;
	a->mnt = mntget(mnt);
	return 1;
}

struct vfsmount *autofs4_find_vfsmount(struct dentry *root)
{
	int err;
	struct args args = {
		.root = root
	};

	err = iterate_mounts(compare_mnt, &args, current->nsproxy->mnt_ns);
}


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