aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/process.c6
-rw-r--r--arch/frv/kernel/process.c5
-rw-r--r--arch/h8300/kernel/process.c5
-rw-r--r--arch/m68knommu/kernel/process.c5
-rw-r--r--arch/mn10300/kernel/process.c12
-rw-r--r--arch/s390/crypto/prng.c2
-rw-r--r--arch/um/drivers/mmapper_kern.c11
-rw-r--r--arch/um/drivers/random.c3
8 files changed, 12 insertions, 37 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 5cc7e2e9e415..45876427eb2d 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -215,22 +215,18 @@ copy_thread(unsigned long clone_flags,
215/* 215/*
216 * sys_execve() executes a new program. 216 * sys_execve() executes a new program.
217 */ 217 */
218
219asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) 218asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
220{ 219{
221 int error; 220 int error;
222 char *filename; 221 char *filename;
223 struct pt_regs *regs = (struct pt_regs *)((&name) + 6); 222 struct pt_regs *regs = (struct pt_regs *)((&name) + 6);
224 223
225 lock_kernel();
226 filename = getname(name); 224 filename = getname(name);
227 error = PTR_ERR(filename); 225 error = PTR_ERR(filename);
228 if (IS_ERR(filename)) 226 if (IS_ERR(filename))
229 goto out; 227 return error;
230 error = do_execve(filename, argv, envp, regs); 228 error = do_execve(filename, argv, envp, regs);
231 putname(filename); 229 putname(filename);
232 out:
233 unlock_kernel();
234 return error; 230 return error;
235} 231}
236 232
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 904255938216..21d0fd19276d 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 __
255 int error; 255 int error;
256 char * filename; 256 char * filename;
257 257
258 lock_kernel();
259 filename = getname(name); 258 filename = getname(name);
260 error = PTR_ERR(filename); 259 error = PTR_ERR(filename);
261 if (IS_ERR(filename)) 260 if (IS_ERR(filename))
262 goto out; 261 return error;
263 error = do_execve(filename, argv, envp, __frame); 262 error = do_execve(filename, argv, envp, __frame);
264 putname(filename); 263 putname(filename);
265 out:
266 unlock_kernel();
267 return error; 264 return error;
268} 265}
269 266
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index e2f33d0f9969..bd883faa983d 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,...)
218 char * filename; 218 char * filename;
219 struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4); 219 struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4);
220 220
221 lock_kernel();
222 filename = getname(name); 221 filename = getname(name);
223 error = PTR_ERR(filename); 222 error = PTR_ERR(filename);
224 if (IS_ERR(filename)) 223 if (IS_ERR(filename))
225 goto out; 224 return error;
226 error = do_execve(filename, argv, envp, regs); 225 error = do_execve(filename, argv, envp, regs);
227 putname(filename); 226 putname(filename);
228out:
229 unlock_kernel();
230 return error; 227 return error;
231} 228}
232 229
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 8f8f4abab2ff..5c9ecd427090 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)
352 char * filename; 352 char * filename;
353 struct pt_regs *regs = (struct pt_regs *) &name; 353 struct pt_regs *regs = (struct pt_regs *) &name;
354 354
355 lock_kernel();
356 filename = getname(name); 355 filename = getname(name);
357 error = PTR_ERR(filename); 356 error = PTR_ERR(filename);
358 if (IS_ERR(filename)) 357 if (IS_ERR(filename))
359 goto out; 358 return error;
360 error = do_execve(filename, argv, envp, regs); 359 error = do_execve(filename, argv, envp, regs);
361 putname(filename); 360 putname(filename);
362out:
363 unlock_kernel();
364 return error; 361 return error;
365} 362}
366 363
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 892cce82867e..ec8a21df1142 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -275,16 +275,12 @@ asmlinkage long sys_execve(char __user *name,
275 char *filename; 275 char *filename;
276 int error; 276 int error;
277 277
278 lock_kernel();
279
280 filename = getname(name); 278 filename = getname(name);
281 error = PTR_ERR(filename); 279 error = PTR_ERR(filename);
282 if (!IS_ERR(filename)) { 280 if (IS_ERR(filename))
283 error = do_execve(filename, argv, envp, __frame); 281 return error;
284 putname(filename); 282 error = do_execve(filename, argv, envp, __frame);
285 } 283 putname(filename);
286
287 unlock_kernel();
288 return error; 284 return error;
289} 285}
290 286
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index b49c00ce65e9..a3209906739e 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -6,7 +6,6 @@
6#include <linux/fs.h> 6#include <linux/fs.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/smp_lock.h>
10#include <linux/miscdevice.h> 9#include <linux/miscdevice.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/moduleparam.h> 11#include <linux/moduleparam.h>
@@ -49,7 +48,6 @@ static unsigned char parm_block[32] = {
49 48
50static int prng_open(struct inode *inode, struct file *file) 49static int prng_open(struct inode *inode, struct file *file)
51{ 50{
52 cycle_kernel_lock();
53 return nonseekable_open(inode, file); 51 return nonseekable_open(inode, file);
54} 52}
55 53
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index eb240323c40a..d22f9e5c0eac 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -16,7 +16,7 @@
16#include <linux/miscdevice.h> 16#include <linux/miscdevice.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/smp_lock.h> 19
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include "mem_user.h" 21#include "mem_user.h"
22 22
@@ -78,7 +78,6 @@ out:
78 78
79static int mmapper_open(struct inode *inode, struct file *file) 79static int mmapper_open(struct inode *inode, struct file *file)
80{ 80{
81 cycle_kernel_lock();
82 return 0; 81 return 0;
83} 82}
84 83
@@ -115,18 +114,16 @@ static int __init mmapper_init(void)
115 v_buf = (char *) find_iomem("mmapper", &mmapper_size); 114 v_buf = (char *) find_iomem("mmapper", &mmapper_size);
116 if (mmapper_size == 0) { 115 if (mmapper_size == 0) {
117 printk(KERN_ERR "mmapper_init - find_iomem failed\n"); 116 printk(KERN_ERR "mmapper_init - find_iomem failed\n");
118 goto out; 117 return -ENODEV;
119 } 118 }
119 p_buf = __pa(v_buf);
120 120
121 err = misc_register(&mmapper_dev); 121 err = misc_register(&mmapper_dev);
122 if (err) { 122 if (err) {
123 printk(KERN_ERR "mmapper - misc_register failed, err = %d\n", 123 printk(KERN_ERR "mmapper - misc_register failed, err = %d\n",
124 err); 124 err);
125 goto out; 125 return err;;
126 } 126 }
127
128 p_buf = __pa(v_buf);
129out:
130 return 0; 127 return 0;
131} 128}
132 129
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index 6eabb7022a2d..4949044773ba 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -7,7 +7,6 @@
7 * of the GNU General Public License, incorporated herein by reference. 7 * of the GNU General Public License, incorporated herein by reference.
8 */ 8 */
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/smp_lock.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/fs.h> 11#include <linux/fs.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
@@ -34,8 +33,6 @@ static DECLARE_WAIT_QUEUE_HEAD(host_read_wait);
34 33
35static int rng_dev_open (struct inode *inode, struct file *filp) 34static int rng_dev_open (struct inode *inode, struct file *filp)
36{ 35{
37 cycle_kernel_lock();
38
39 /* enforce read-only access to this chrdev */ 36 /* enforce read-only access to this chrdev */
40 if ((filp->f_mode & FMODE_READ) == 0) 37 if ((filp->f_mode & FMODE_READ) == 0)
41 return -EINVAL; 38 return -EINVAL;