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]
Date:	Sat,  5 May 2007 16:18:23 -0400
From:	"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Adrian Brunyate <abrunyate@...oo.com>,
	"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
Subject: [PATCH 1/3] Unionfs: Accept MS_SILENT during remount

From: Adrian Brunyate <abrunyate@...oo.com>

[jsipek: whitespace cleanup]
Signed-off-by: Adrian Brunyate <abrunyate@...oo.com>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@...sunysb.edu>
---
 fs/unionfs/super.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index e6a6cc1..ee12d03 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -425,11 +425,12 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
 	unionfs_write_lock(sb);
 
 	/*
-	 * The VFS will take care of "ro" and "rw" flags, so anything else
-	 * is an error.  So we need to check if any other flags may have
-	 * been passed (none are allowed/supported as of now).
+	 * The VFS will take care of "ro" and "rw" flags, and we can safely
+	 * ignore MS_SILENT, but anything else left over is an error.  So we
+	 * need to check if any other flags may have been passed (none are
+	 * allowed/supported as of now).
 	 */
-	if ((*flags & ~MS_RDONLY) != 0) {
+	if ((*flags & ~(MS_RDONLY | MS_SILENT)) != 0) {
 		printk(KERN_WARNING
 		       "unionfs: remount flags 0x%x unsupported\n", *flags);
 		err = -EINVAL;
@@ -731,7 +732,8 @@ out_no_change:
 	i = atomic_inc_return(&UNIONFS_SB(sb)->generation);
 	atomic_set(&UNIONFS_D(sb->s_root)->generation, i);
 	atomic_set(&UNIONFS_I(sb->s_root->d_inode)->generation, i);
-	printk("unionfs: new generation number %d\n", i);
+	if (!(*flags & MS_SILENT)) 
+		printk("unionfs: new generation number %d\n", i);
 	err = 0;		/* reset to success */
 
 	/*
-- 
1.5.0.3.1043.g4342

-
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