Commit 2588465badb648a50cd19623f0dd0063c90d4e31
Exists in
master
and in
7 other branches
Merge branch 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: mn10300: Remove the BKL from sys_execve m68knommu: Remove the BKL from sys_execve m68k: Remove the BKL from sys_execve h83000: Remove BKL from sys_execve frv: Remove the BKL from sys_execve blackfin: Remove the BKL from sys_execve um: Remove BKL from mmapper um: Remove BKL from random s390: Remove BKL from prng
Showing 8 changed files Side-by-side Diff
arch/blackfin/kernel/process.c
... | ... | @@ -215,22 +215,18 @@ |
215 | 215 | /* |
216 | 216 | * sys_execve() executes a new program. |
217 | 217 | */ |
218 | - | |
219 | 218 | asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) |
220 | 219 | { |
221 | 220 | int error; |
222 | 221 | char *filename; |
223 | 222 | struct pt_regs *regs = (struct pt_regs *)((&name) + 6); |
224 | 223 | |
225 | - lock_kernel(); | |
226 | 224 | filename = getname(name); |
227 | 225 | error = PTR_ERR(filename); |
228 | 226 | if (IS_ERR(filename)) |
229 | - goto out; | |
227 | + return error; | |
230 | 228 | error = do_execve(filename, argv, envp, regs); |
231 | 229 | putname(filename); |
232 | - out: | |
233 | - unlock_kernel(); | |
234 | 230 | return error; |
235 | 231 | } |
236 | 232 |
arch/frv/kernel/process.c
... | ... | @@ -255,15 +255,12 @@ |
255 | 255 | int error; |
256 | 256 | char * filename; |
257 | 257 | |
258 | - lock_kernel(); | |
259 | 258 | filename = getname(name); |
260 | 259 | error = PTR_ERR(filename); |
261 | 260 | if (IS_ERR(filename)) |
262 | - goto out; | |
261 | + return error; | |
263 | 262 | error = do_execve(filename, argv, envp, __frame); |
264 | 263 | putname(filename); |
265 | - out: | |
266 | - unlock_kernel(); | |
267 | 264 | return error; |
268 | 265 | } |
269 | 266 |
arch/h8300/kernel/process.c
... | ... | @@ -218,15 +218,12 @@ |
218 | 218 | char * filename; |
219 | 219 | struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4); |
220 | 220 | |
221 | - lock_kernel(); | |
222 | 221 | filename = getname(name); |
223 | 222 | error = PTR_ERR(filename); |
224 | 223 | if (IS_ERR(filename)) |
225 | - goto out; | |
224 | + return error; | |
226 | 225 | error = do_execve(filename, argv, envp, regs); |
227 | 226 | putname(filename); |
228 | -out: | |
229 | - unlock_kernel(); | |
230 | 227 | return error; |
231 | 228 | } |
232 | 229 |
arch/m68knommu/kernel/process.c
... | ... | @@ -352,15 +352,12 @@ |
352 | 352 | char * filename; |
353 | 353 | struct pt_regs *regs = (struct pt_regs *) &name; |
354 | 354 | |
355 | - lock_kernel(); | |
356 | 355 | filename = getname(name); |
357 | 356 | error = PTR_ERR(filename); |
358 | 357 | if (IS_ERR(filename)) |
359 | - goto out; | |
358 | + return error; | |
360 | 359 | error = do_execve(filename, argv, envp, regs); |
361 | 360 | putname(filename); |
362 | -out: | |
363 | - unlock_kernel(); | |
364 | 361 | return error; |
365 | 362 | } |
366 | 363 |
arch/mn10300/kernel/process.c
... | ... | @@ -275,16 +275,12 @@ |
275 | 275 | char *filename; |
276 | 276 | int error; |
277 | 277 | |
278 | - lock_kernel(); | |
279 | - | |
280 | 278 | filename = getname(name); |
281 | 279 | error = PTR_ERR(filename); |
282 | - if (!IS_ERR(filename)) { | |
283 | - error = do_execve(filename, argv, envp, __frame); | |
284 | - putname(filename); | |
285 | - } | |
286 | - | |
287 | - unlock_kernel(); | |
280 | + if (IS_ERR(filename)) | |
281 | + return error; | |
282 | + error = do_execve(filename, argv, envp, __frame); | |
283 | + putname(filename); | |
288 | 284 | return error; |
289 | 285 | } |
290 | 286 |
arch/s390/crypto/prng.c
... | ... | @@ -6,7 +6,6 @@ |
6 | 6 | #include <linux/fs.h> |
7 | 7 | #include <linux/init.h> |
8 | 8 | #include <linux/kernel.h> |
9 | -#include <linux/smp_lock.h> | |
10 | 9 | #include <linux/miscdevice.h> |
11 | 10 | #include <linux/module.h> |
12 | 11 | #include <linux/moduleparam.h> |
... | ... | @@ -49,7 +48,6 @@ |
49 | 48 | |
50 | 49 | static int prng_open(struct inode *inode, struct file *file) |
51 | 50 | { |
52 | - cycle_kernel_lock(); | |
53 | 51 | return nonseekable_open(inode, file); |
54 | 52 | } |
55 | 53 |
arch/um/drivers/mmapper_kern.c
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | #include <linux/miscdevice.h> |
17 | 17 | #include <linux/module.h> |
18 | 18 | #include <linux/mm.h> |
19 | -#include <linux/smp_lock.h> | |
19 | + | |
20 | 20 | #include <asm/uaccess.h> |
21 | 21 | #include "mem_user.h" |
22 | 22 | |
... | ... | @@ -78,7 +78,6 @@ |
78 | 78 | |
79 | 79 | static int mmapper_open(struct inode *inode, struct file *file) |
80 | 80 | { |
81 | - cycle_kernel_lock(); | |
82 | 81 | return 0; |
83 | 82 | } |
84 | 83 | |
85 | 84 | |
86 | 85 | |
87 | 86 | |
... | ... | @@ -115,18 +114,16 @@ |
115 | 114 | v_buf = (char *) find_iomem("mmapper", &mmapper_size); |
116 | 115 | if (mmapper_size == 0) { |
117 | 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 | 121 | err = misc_register(&mmapper_dev); |
122 | 122 | if (err) { |
123 | 123 | printk(KERN_ERR "mmapper - misc_register failed, err = %d\n", |
124 | 124 | err); |
125 | - goto out; | |
125 | + return err;; | |
126 | 126 | } |
127 | - | |
128 | - p_buf = __pa(v_buf); | |
129 | -out: | |
130 | 127 | return 0; |
131 | 128 | } |
132 | 129 |
arch/um/drivers/random.c
... | ... | @@ -7,7 +7,6 @@ |
7 | 7 | * of the GNU General Public License, incorporated herein by reference. |
8 | 8 | */ |
9 | 9 | #include <linux/sched.h> |
10 | -#include <linux/smp_lock.h> | |
11 | 10 | #include <linux/module.h> |
12 | 11 | #include <linux/fs.h> |
13 | 12 | #include <linux/interrupt.h> |
... | ... | @@ -34,8 +33,6 @@ |
34 | 33 | |
35 | 34 | static int rng_dev_open (struct inode *inode, struct file *filp) |
36 | 35 | { |
37 | - cycle_kernel_lock(); | |
38 | - | |
39 | 36 | /* enforce read-only access to this chrdev */ |
40 | 37 | if ((filp->f_mode & FMODE_READ) == 0) |
41 | 38 | return -EINVAL; |