Skip to content

Commit

Permalink
Merge branch 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/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
  • Loading branch information
Linus Torvalds committed Dec 9, 2009
2 parents 18821b0 + 8c0daee commit 2588465
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 37 deletions.
6 changes: 1 addition & 5 deletions arch/blackfin/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 1 addition & 4 deletions arch/frv/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 1 addition & 4 deletions arch/h8300/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 1 addition & 4 deletions arch/m68knommu/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
12 changes: 4 additions & 8 deletions arch/mn10300/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions arch/s390/crypto/prng.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/smp_lock.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
Expand Down Expand Up @@ -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);
}

Expand Down
11 changes: 4 additions & 7 deletions arch/um/drivers/mmapper_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include "mem_user.h"

Expand Down Expand Up @@ -78,7 +78,6 @@ static int mmapper_mmap(struct file *file, struct vm_area_struct *vma)

static int mmapper_open(struct inode *inode, struct file *file)
{
cycle_kernel_lock();
return 0;
}

Expand Down Expand Up @@ -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;
}

Expand Down
3 changes: 0 additions & 3 deletions arch/um/drivers/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* of the GNU General Public License, incorporated herein by reference.
*/
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
Expand All @@ -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;
Expand Down

0 comments on commit 2588465

Please sign in to comment.