diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 14:48:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 14:48:31 -0700 |
commit | d1794f2c5b5817eb79ccc5e00701ca748d1b073a (patch) | |
tree | 5a4c98e694e88a8c82f342d0cc9edb2a4cbbef36 /arch/um | |
parent | a41eebab7537890409ea9dfe0fcda9b5fbdb090d (diff) | |
parent | 2fceef397f9880b212a74c418290ce69e7ac00eb (diff) |
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits)
IB/umad: BKL is not needed for ib_umad_open()
IB/uverbs: BKL is not needed for ib_uverbs_open()
bf561-coreb: BKL unneeded for open()
Call fasync() functions without the BKL
snd/PCM: fasync BKL pushdown
ipmi: fasync BKL pushdown
ecryptfs: fasync BKL pushdown
Bluetooth VHCI: fasync BKL pushdown
tty_io: fasync BKL pushdown
tun: fasync BKL pushdown
i2o: fasync BKL pushdown
mpt: fasync BKL pushdown
Remove BKL from remote_llseek v2
Make FAT users happier by not deadlocking
x86-mce: BKL pushdown
vmwatchdog: BKL pushdown
vmcp: BKL pushdown
via-pmu: BKL pushdown
uml-random: BKL pushdown
uml-mmapper: BKL pushdown
...
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/harddog_kern.c | 3 | ||||
-rw-r--r-- | arch/um/drivers/mmapper_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/random.c | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c index a9ad4bd6d95..d332503fa1b 100644 --- a/arch/um/drivers/harddog_kern.c +++ b/arch/um/drivers/harddog_kern.c @@ -66,6 +66,7 @@ static int harddog_open(struct inode *inode, struct file *file) int err = -EBUSY; char *sock = NULL; + lock_kernel(); spin_lock(&lock); if(timer_alive) goto err; @@ -82,9 +83,11 @@ static int harddog_open(struct inode *inode, struct file *file) timer_alive = 1; spin_unlock(&lock); + unlock_kernel(); return nonseekable_open(inode, file); err: spin_unlock(&lock); + unlock_kernel(); return err; } diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c index 67b2f55a602..eb240323c40 100644 --- a/arch/um/drivers/mmapper_kern.c +++ b/arch/um/drivers/mmapper_kern.c @@ -16,6 +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" @@ -77,6 +78,7 @@ out: static int mmapper_open(struct inode *inode, struct file *file) { + cycle_kernel_lock(); return 0; } diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index 4949044773b..6eabb7022a2 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c @@ -7,6 +7,7 @@ * 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> @@ -33,6 +34,8 @@ 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; |