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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Jul 2013 00:07:03 +0800
From:	Peng Tao <bergwolf@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, Patrick Farrell <paf@...y.com>,
	Peng Tao <tao.peng@....com>,
	Andreas Dilger <andreas.dilger@...el.com>
Subject: [PATCH 42/48] staging/lustre/llite: Anonymous dentry incorrectly identified as root

From: Patrick Farrell <paf@...y.com>

When exporting Lustre via NFS on SLES11SP2, this check incorrectly identifies
anonymous dentries as root dentries.  This is due to a change in SLES11SP2
which makes the d_name.name for anonymous dentries the same as that for root
dentries.  (Details in LU-3484.)

This changes the check to directly compare the value of the dentry pointer
to the root dentry pointer found in the superblock, rather than using the name.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3484
Lustre-change: http://review.whamcloud.com/6726
Signed-off-by: Patrick Farrell <paf@...y.com>
Reviewed-by: Bob Glossman <bob.glossman@...el.com>
Reviewed-by: Andreas Dilger <andreas.dilger@...el.com>
Reviewed-by: Peng Tao <bergwolf@...il.com>
Reviewed-by: James Simmons <uja.ornl@...il.com>
Reviewed-by: Alexey Shvetsov <alexxy@...too.org>
Signed-off-by: Peng Tao <tao.peng@....com>
Signed-off-by: Andreas Dilger <andreas.dilger@...el.com>
---
 drivers/staging/lustre/lustre/llite/dcache.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c
index a160a84..0d49e1b 100644
--- a/drivers/staging/lustre/lustre/llite/dcache.c
+++ b/drivers/staging/lustre/lustre/llite/dcache.c
@@ -295,9 +295,10 @@ void ll_invalidate_aliases(struct inode *inode)
 		       dentry->d_name.name, dentry, dentry->d_parent,
 		       dentry->d_inode, dentry->d_flags);
 
-		if (dentry->d_name.len == 1 && dentry->d_name.name[0] == '/') {
-			CERROR("called on root (?) dentry=%p, inode=%p "
-			       "ino=%lu\n", dentry, inode, inode->i_ino);
+		if (unlikely(dentry == dentry->d_sb->s_root)) {
+			CERROR("%s: called on root dentry=%p, fid="DFID"\n",
+			       ll_get_fsname(dentry->d_sb, NULL, 0),
+			       dentry, PFID(ll_inode2fid(inode)));
 			lustre_dump_dentry(dentry, 1);
 			dump_stack();
 		}
-- 
1.7.9.5

--
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