diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 17:48:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 17:48:31 -0400 |
commit | d1794f2c5b5817eb79ccc5e00701ca748d1b073a (patch) | |
tree | 5a4c98e694e88a8c82f342d0cc9edb2a4cbbef36 /drivers/misc | |
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 'drivers/misc')
-rw-r--r-- | drivers/misc/hdpuftrs/hdpu_cpustate.c | 9 | ||||
-rw-r--r-- | drivers/misc/phantom.c | 9 | ||||
-rw-r--r-- | drivers/misc/sony-laptop.c | 3 |
3 files changed, 18 insertions, 3 deletions
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index ff51ab67231c..176fe4e09d3f 100644 --- a/drivers/misc/hdpuftrs/hdpu_cpustate.c +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/smp_lock.h> | ||
20 | #include <linux/miscdevice.h> | 21 | #include <linux/miscdevice.h> |
21 | #include <linux/proc_fs.h> | 22 | #include <linux/proc_fs.h> |
22 | #include <linux/hdpu_features.h> | 23 | #include <linux/hdpu_features.h> |
@@ -151,7 +152,13 @@ static ssize_t cpustate_write(struct file *file, const char *buf, | |||
151 | 152 | ||
152 | static int cpustate_open(struct inode *inode, struct file *file) | 153 | static int cpustate_open(struct inode *inode, struct file *file) |
153 | { | 154 | { |
154 | return cpustate_get_ref((file->f_flags & O_EXCL)); | 155 | int ret; |
156 | |||
157 | lock_kernel(); | ||
158 | ret = cpustate_get_ref((file->f_flags & O_EXCL)); | ||
159 | unlock_kernel(); | ||
160 | |||
161 | return ret; | ||
155 | } | 162 | } |
156 | 163 | ||
157 | static int cpustate_release(struct inode *inode, struct file *file) | 164 | static int cpustate_release(struct inode *inode, struct file *file) |
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index 71d1c84e2fa8..186162470090 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/cdev.h> | 23 | #include <linux/cdev.h> |
24 | #include <linux/phantom.h> | 24 | #include <linux/phantom.h> |
25 | #include <linux/smp_lock.h> | ||
25 | 26 | ||
26 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
@@ -212,13 +213,17 @@ static int phantom_open(struct inode *inode, struct file *file) | |||
212 | struct phantom_device *dev = container_of(inode->i_cdev, | 213 | struct phantom_device *dev = container_of(inode->i_cdev, |
213 | struct phantom_device, cdev); | 214 | struct phantom_device, cdev); |
214 | 215 | ||
216 | lock_kernel(); | ||
215 | nonseekable_open(inode, file); | 217 | nonseekable_open(inode, file); |
216 | 218 | ||
217 | if (mutex_lock_interruptible(&dev->open_lock)) | 219 | if (mutex_lock_interruptible(&dev->open_lock)) { |
220 | unlock_kernel(); | ||
218 | return -ERESTARTSYS; | 221 | return -ERESTARTSYS; |
222 | } | ||
219 | 223 | ||
220 | if (dev->opened) { | 224 | if (dev->opened) { |
221 | mutex_unlock(&dev->open_lock); | 225 | mutex_unlock(&dev->open_lock); |
226 | unlock_kernel(); | ||
222 | return -EINVAL; | 227 | return -EINVAL; |
223 | } | 228 | } |
224 | 229 | ||
@@ -229,7 +234,7 @@ static int phantom_open(struct inode *inode, struct file *file) | |||
229 | atomic_set(&dev->counter, 0); | 234 | atomic_set(&dev->counter, 0); |
230 | dev->opened++; | 235 | dev->opened++; |
231 | mutex_unlock(&dev->open_lock); | 236 | mutex_unlock(&dev->open_lock); |
232 | 237 | unlock_kernel(); | |
233 | return 0; | 238 | return 0; |
234 | } | 239 | } |
235 | 240 | ||
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 00e48e2a9c11..60775be22822 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/moduleparam.h> | 47 | #include <linux/moduleparam.h> |
48 | #include <linux/init.h> | 48 | #include <linux/init.h> |
49 | #include <linux/smp_lock.h> | ||
49 | #include <linux/types.h> | 50 | #include <linux/types.h> |
50 | #include <linux/backlight.h> | 51 | #include <linux/backlight.h> |
51 | #include <linux/platform_device.h> | 52 | #include <linux/platform_device.h> |
@@ -1927,8 +1928,10 @@ static int sonypi_misc_release(struct inode *inode, struct file *file) | |||
1927 | static int sonypi_misc_open(struct inode *inode, struct file *file) | 1928 | static int sonypi_misc_open(struct inode *inode, struct file *file) |
1928 | { | 1929 | { |
1929 | /* Flush input queue on first open */ | 1930 | /* Flush input queue on first open */ |
1931 | lock_kernel(); | ||
1930 | if (atomic_inc_return(&sonypi_compat.open_count) == 1) | 1932 | if (atomic_inc_return(&sonypi_compat.open_count) == 1) |
1931 | kfifo_reset(sonypi_compat.fifo); | 1933 | kfifo_reset(sonypi_compat.fifo); |
1934 | unlock_kernel(); | ||
1932 | return 0; | 1935 | return 0; |
1933 | } | 1936 | } |
1934 | 1937 | ||