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-next>] [day] [month] [year] [list]
Message-Id: <1409220549-15485-1-git-send-email-linx.z.chen@intel.com>
Date:	Thu, 28 Aug 2014 18:09:09 +0800
From:	Chen LinX <linx.z.chen@...el.com>
To:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Cc:	yanmin_zhang@...ux.intel.com, "Chen, LinX" <linx.z.chen@...el.com>,
	"He, Bo" <bo.he@...el.com>
Subject: [PATCH] debugfs: keep the old valid mode value when no explicity specify it

From: "Chen, LinX" <linx.z.chen@...el.com>

When mount debugfs with no mode specifed after it's mounted, the mount
point mode will change to default mode(0700) even the mount operation was fail,
this will cause some issues like can't get binder info in android. Here we can
keep the old valid mode if no explicity specify the mode value and also change
the mode value even the mount fails if the mode value is specified.

Change-Id: I591ce5328e9589adfc3d7317f04276bf0033202a
Signed-off-by: He, Bo <bo.he@...el.com>
Signed-off-by: Chen, LinX <linx.z.chen@...el.com>
---
 fs/debugfs/inode.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c7c83ff..f1eb4b9 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -159,7 +159,8 @@ static int debugfs_parse_options(char *data, struct debugfs_mount_opts *opts)
 	kgid_t gid;
 	char *p;
 
-	opts->mode = DEBUGFS_DEFAULT_MODE;
+	if (opts->mode == 0)
+		opts->mode = DEBUGFS_DEFAULT_MODE;
 
 	while ((p = strsep(&data, ",")) != NULL) {
 		if (!*p)
-- 
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