From ca1b82ba0888e742a7efdb89ed8e2aab453e091f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 10 Oct 2009 10:21:03 +0200 Subject: s390: Remove BKL from prng cycle_kernel_lock() was added during the big BKL pushdown. It should ensure the serializiation against driver init code. In this case there is nothing to serialize. Remove it. Signed-off-by: Thomas Gleixner Cc: Martin Schwidefsky LKML-Reference: <20091010153349.601625576@linutronix.de> Acked-by: Jan Glauber --- arch/s390/crypto/prng.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch') diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c index b49c00ce65e..a3209906739 100644 --- a/arch/s390/crypto/prng.c +++ b/arch/s390/crypto/prng.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -49,7 +48,6 @@ static unsigned char parm_block[32] = { static int prng_open(struct inode *inode, struct file *file) { - cycle_kernel_lock(); return nonseekable_open(inode, file); } -- cgit v1.2.3-18-g5258 From df502e389383b219e44819fe757614450d95f297 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 10 Oct 2009 15:36:30 +0000 Subject: um: Remove BKL from random cycle_kernel_lock() was added during the big BKL pushdown. It should ensure the serializiation against driver init code. In this case there is nothing to serialize. Remove it. Signed-off-by: Thomas Gleixner LKML-Reference: <20091010153349.641118498@linutronix.de> Cc: Jeff Dike --- arch/um/drivers/random.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch') diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index 6eabb7022a2..4949044773b 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c @@ -7,7 +7,6 @@ * of the GNU General Public License, incorporated herein by reference. */ #include -#include #include #include #include @@ -34,8 +33,6 @@ static DECLARE_WAIT_QUEUE_HEAD(host_read_wait); static int rng_dev_open (struct inode *inode, struct file *filp) { - cycle_kernel_lock(); - /* enforce read-only access to this chrdev */ if ((filp->f_mode & FMODE_READ) == 0) return -EINVAL; -- cgit v1.2.3-18-g5258 From d63c489b881707adf9c0b89f771b30a1d78f4197 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 10 Oct 2009 15:36:34 +0000 Subject: um: Remove BKL from mmapper cycle_kernel_lock() was added during the big BKL pushdown. It should ensure the serializiation against driver init code. mmapper_open() cannot be called before misc_register() succeeded, but p_buf might be uninitialized. Move the initialization of p_buf before the misc_register() call and get rid of cycle_kernel_lock(). Signed-off-by: Thomas Gleixner LKML-Reference: <20091010153349.682213670@linutronix.de> Cc: Jeff Dike --- arch/um/drivers/mmapper_kern.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'arch') diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c index eb240323c40..d22f9e5c0ea 100644 --- a/arch/um/drivers/mmapper_kern.c +++ b/arch/um/drivers/mmapper_kern.c @@ -16,7 +16,7 @@ #include #include #include -#include + #include #include "mem_user.h" @@ -78,7 +78,6 @@ out: static int mmapper_open(struct inode *inode, struct file *file) { - cycle_kernel_lock(); return 0; } @@ -115,18 +114,16 @@ static int __init mmapper_init(void) v_buf = (char *) find_iomem("mmapper", &mmapper_size); if (mmapper_size == 0) { printk(KERN_ERR "mmapper_init - find_iomem failed\n"); - goto out; + return -ENODEV; } + p_buf = __pa(v_buf); err = misc_register(&mmapper_dev); if (err) { printk(KERN_ERR "mmapper - misc_register failed, err = %d\n", err); - goto out; + return err;; } - - p_buf = __pa(v_buf); -out: return 0; } -- cgit v1.2.3-18-g5258 From 25708a5fe7467dcc69d9b92c1701aad4a0c71887 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Mon, 12 Oct 2009 22:44:40 +0200 Subject: blackfin: Remove the BKL from sys_execve This looks like a cut-and-paste job. For example, compare this function to sys_execve in arch/x86/kernel/process_64.c and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here. Signed-off-by: John Kacur Reviewed-by: Frederic Weisbecker Acked-by: Mike Frysinger LKML-Reference: Signed-off-by: Thomas Gleixner --- arch/blackfin/kernel/process.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 430ae39456e..7d9c9750fd9 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c @@ -215,22 +215,18 @@ copy_thread(unsigned long clone_flags, /* * sys_execve() executes a new program. */ - asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) { int error; char *filename; struct pt_regs *regs = (struct pt_regs *)((&name) + 6); - lock_kernel(); filename = getname(name); error = PTR_ERR(filename); if (IS_ERR(filename)) - goto out; + return error; error = do_execve(filename, argv, envp, regs); putname(filename); - out: - unlock_kernel(); return error; } -- cgit v1.2.3-18-g5258 From b69975a35a7332624b6977a5676a6fc320070360 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Mon, 12 Oct 2009 22:53:25 +0200 Subject: frv: Remove the BKL from sys_execve sys_execve for frv seems to be a copy-and-paste of sys_execve that no longer requires the bkl. Just remove it. Signed-off-by: John Kacur Reviewed-by: Frederic Weisbecker Acked-by: David Howells LKML-Reference: Signed-off-by: Thomas Gleixner --- arch/frv/kernel/process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 90425593821..21d0fd19276 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c @@ -255,15 +255,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __ int error; char * filename; - lock_kernel(); filename = getname(name); error = PTR_ERR(filename); if (IS_ERR(filename)) - goto out; + return error; error = do_execve(filename, argv, envp, __frame); putname(filename); - out: - unlock_kernel(); return error; } -- cgit v1.2.3-18-g5258 From e3c1a6b35c84795f7cb31cb7f4748166904cc0bc Mon Sep 17 00:00:00 2001 From: John Kacur Date: Mon, 12 Oct 2009 23:04:11 +0200 Subject: h83000: Remove BKL from sys_execve This looks like a copy-and-paste job for code that no-longer needs the BKL Just remove it. Signed-off-by: John Kacur Reviewed-by: Frederic Weisbecker Cc: Yoshinori Sato LKML-Reference: Signed-off-by: Thomas Gleixner --- arch/h8300/kernel/process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index e2f33d0f996..bd883faa983 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c @@ -218,15 +218,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp,int dummy,...) char * filename; struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4); - lock_kernel(); filename = getname(name); error = PTR_ERR(filename); if (IS_ERR(filename)) - goto out; + return error; error = do_execve(filename, argv, envp, regs); putname(filename); -out: - unlock_kernel(); return error; } -- cgit v1.2.3-18-g5258 From 2624167cd8b4965d0ef548e84767a30214edd8d4 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Mon, 12 Oct 2009 23:09:24 +0200 Subject: m68k: Remove the BKL from sys_execve This seems like a copy-and-paste from code that no-longer needs the BKL Just remove it. Signed-off-by: John Kacur Reviewed-by: Frederic Weisbecker LKML-Reference: Cc: Geert Uytterhoeven Signed-off-by: Thomas Gleixner --- arch/m68k/kernel/process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 41230c595a8..05296593e71 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c @@ -317,15 +317,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __ char * filename; struct pt_regs *regs = (struct pt_regs *) &name; - lock_kernel(); filename = getname(name); error = PTR_ERR(filename); if (IS_ERR(filename)) - goto out; + return error; error = do_execve(filename, argv, envp, regs); putname(filename); -out: - unlock_kernel(); return error; } -- cgit v1.2.3-18-g5258 From eb7371d4fdcc40a390e8bdf90c99b5541213ca45 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Mon, 12 Oct 2009 23:37:28 +0200 Subject: m68knommu: Remove the BKL from sys_execve This looks like a copy-and-paste of functionality that no-longer needs the bkl. Just remove it. Signed-off-by: John Kacur Reviewed: Frederic Weisbecker Acked-by: Greg Ungerer LKML-Reference: Signed-off-by: Thomas Gleixner --- arch/m68knommu/kernel/process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 8f8f4abab2f..5c9ecd42709 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c @@ -352,15 +352,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp) char * filename; struct pt_regs *regs = (struct pt_regs *) &name; - lock_kernel(); filename = getname(name); error = PTR_ERR(filename); if (IS_ERR(filename)) - goto out; + return error; error = do_execve(filename, argv, envp, regs); putname(filename); -out: - unlock_kernel(); return error; } -- cgit v1.2.3-18-g5258 From 8c0daee204f794d095ae301f408c5f9f40e4547d Mon Sep 17 00:00:00 2001 From: John Kacur Date: Mon, 12 Oct 2009 23:41:55 +0200 Subject: mn10300: Remove the BKL from sys_execve This looks like a cut-and-paste from functionality that no-longer needs the bkl Just remove it. Also, rewrite slightly so that it looks closer to sys_execve on other architectures. Signed-off-by: John Kacur Reviewed-by: Frederic Weisbecker Acked-by: David Howells Cc: Koichi Yasutake LKML-Reference: Signed-off-by: Thomas Gleixner --- arch/mn10300/kernel/process.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'arch') diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c index 892cce82867..ec8a21df114 100644 --- a/arch/mn10300/kernel/process.c +++ b/arch/mn10300/kernel/process.c @@ -275,16 +275,12 @@ asmlinkage long sys_execve(char __user *name, char *filename; int error; - lock_kernel(); - filename = getname(name); error = PTR_ERR(filename); - if (!IS_ERR(filename)) { - error = do_execve(filename, argv, envp, __frame); - putname(filename); - } - - unlock_kernel(); + if (IS_ERR(filename)) + return error; + error = do_execve(filename, argv, envp, __frame); + putname(filename); return error; } -- cgit v1.2.3-18-g5258