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:	Mon,  2 Nov 2009 11:04:55 +0100
From:	Jan Blunck <jblunck@...e.de>
To:	linux-fsdevel@...r.kernel.org
Cc:	Matthew Wilcox <matthew@....cx>, linux-kernel@...r.kernel.org,
	Jan Blunck <jblunck@...e.de>,
	Sukadev Bhattiprolu <sukadev@...ibm.com>,
	Alan Cox <alan@...ux.intel.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Serge Hallyn <serue@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 15/27] BKL: Remove BKL from devpts

BKL is only used in get_sb. It is safe to remove it.

Signed-off-by: Jan Blunck <jblunck@...e.de>
---
 fs/devpts/inode.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index e206eef..d5f8c96 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -24,7 +24,6 @@
 #include <linux/parser.h>
 #include <linux/fsnotify.h>
 #include <linux/seq_file.h>
-#include <linux/smp_lock.h> /* just for lock_kernel() */
 
 #define DEVPTS_DEFAULT_MODE 0600
 /*
@@ -364,23 +363,17 @@ static int devpts_get_sb(struct file_system_type *fs_type,
 	struct pts_mount_opts opts;
 	struct super_block *s;
 
-	lock_kernel();
-
 	error = parse_mount_options(data, PARSE_MOUNT, &opts);
-	if (error) {
-		unlock_kernel();
+	if (error)
 		return error;
-	}
 
 	if (opts.newinstance)
 		s = sget(fs_type, NULL, set_anon_super, NULL);
 	else
 		s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL);
 
-	if (IS_ERR(s)) {
-		unlock_kernel();
+	if (IS_ERR(s))
 		return PTR_ERR(s);
-	}
 
 	if (!s->s_root) {
 		s->s_flags = flags;
@@ -398,7 +391,6 @@ static int devpts_get_sb(struct file_system_type *fs_type,
 	if (error)
 		goto out_dput;
 
-	unlock_kernel();
 	return 0;
 
 out_dput:
@@ -406,7 +398,6 @@ out_dput:
 
 out_undo_sget:
 	deactivate_locked_super(s);
-	unlock_kernel();
 	return error;
 }
 
-- 
1.6.4.2

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