diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:23:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:23:28 -0400 |
commit | 98c89cdd3a292af3451e47a2a33132f5183861b0 (patch) | |
tree | cfad77bcfd2d04fb0b9326a859803a1ab90b0757 /drivers | |
parent | 164d44fd92e79d5bce54d0d62df9f856f7b23925 (diff) | |
parent | 99df95a22f7cfcf85405d4edc07c2d953542f0dd (diff) |
Merge branch 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
sunrpc: Include missing smp_lock.h
procfs: Kill the bkl in ioctl
procfs: Push down the bkl from ioctl
procfs: Use generic_file_llseek in /proc/vmcore
procfs: Use generic_file_llseek in /proc/kmsg
procfs: Use generic_file_llseek in /proc/kcore
procfs: Kill BKL in llseek on proc base
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/i8k.c | 21 | ||||
-rw-r--r-- | drivers/isdn/divert/divert_procfs.c | 18 |
2 files changed, 30 insertions, 9 deletions
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index fc8cf7ac7f2..4cd8b227c11 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
24 | #include <linux/dmi.h> | 24 | #include <linux/dmi.h> |
25 | #include <linux/capability.h> | 25 | #include <linux/capability.h> |
26 | #include <linux/smp_lock.h> | ||
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | 29 | ||
@@ -82,8 +83,7 @@ module_param(fan_mult, int, 0); | |||
82 | MODULE_PARM_DESC(fan_mult, "Factor to multiply fan speed with"); | 83 | MODULE_PARM_DESC(fan_mult, "Factor to multiply fan speed with"); |
83 | 84 | ||
84 | static int i8k_open_fs(struct inode *inode, struct file *file); | 85 | static int i8k_open_fs(struct inode *inode, struct file *file); |
85 | static int i8k_ioctl(struct inode *, struct file *, unsigned int, | 86 | static long i8k_ioctl(struct file *, unsigned int, unsigned long); |
86 | unsigned long); | ||
87 | 87 | ||
88 | static const struct file_operations i8k_fops = { | 88 | static const struct file_operations i8k_fops = { |
89 | .owner = THIS_MODULE, | 89 | .owner = THIS_MODULE, |
@@ -91,7 +91,7 @@ static const struct file_operations i8k_fops = { | |||
91 | .read = seq_read, | 91 | .read = seq_read, |
92 | .llseek = seq_lseek, | 92 | .llseek = seq_lseek, |
93 | .release = single_release, | 93 | .release = single_release, |
94 | .ioctl = i8k_ioctl, | 94 | .unlocked_ioctl = i8k_ioctl, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | struct smm_regs { | 97 | struct smm_regs { |
@@ -307,8 +307,8 @@ static int i8k_get_dell_signature(int req_fn) | |||
307 | return regs.eax == 1145651527 && regs.edx == 1145392204 ? 0 : -1; | 307 | return regs.eax == 1145651527 && regs.edx == 1145392204 ? 0 : -1; |
308 | } | 308 | } |
309 | 309 | ||
310 | static int i8k_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, | 310 | static int |
311 | unsigned long arg) | 311 | i8k_ioctl_unlocked(struct file *fp, unsigned int cmd, unsigned long arg) |
312 | { | 312 | { |
313 | int val = 0; | 313 | int val = 0; |
314 | int speed; | 314 | int speed; |
@@ -395,6 +395,17 @@ static int i8k_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, | |||
395 | return 0; | 395 | return 0; |
396 | } | 396 | } |
397 | 397 | ||
398 | static long i8k_ioctl(struct file *fp, unsigned int cmd, unsigned long arg) | ||
399 | { | ||
400 | long ret; | ||
401 | |||
402 | lock_kernel(); | ||
403 | ret = i8k_ioctl_unlocked(fp, cmd, arg); | ||
404 | unlock_kernel(); | ||
405 | |||
406 | return ret; | ||
407 | } | ||
408 | |||
398 | /* | 409 | /* |
399 | * Print the information for /proc/i8k. | 410 | * Print the information for /proc/i8k. |
400 | */ | 411 | */ |
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index 9f49d906579..c53e2417e7d 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/isdnif.h> | 21 | #include <linux/isdnif.h> |
22 | #include <net/net_namespace.h> | 22 | #include <net/net_namespace.h> |
23 | #include <linux/smp_lock.h> | ||
23 | #include "isdn_divert.h" | 24 | #include "isdn_divert.h" |
24 | 25 | ||
25 | 26 | ||
@@ -177,9 +178,7 @@ isdn_divert_close(struct inode *ino, struct file *filep) | |||
177 | /*********/ | 178 | /*********/ |
178 | /* IOCTL */ | 179 | /* IOCTL */ |
179 | /*********/ | 180 | /*********/ |
180 | static int | 181 | static int isdn_divert_ioctl_unlocked(struct file *file, uint cmd, ulong arg) |
181 | isdn_divert_ioctl(struct inode *inode, struct file *file, | ||
182 | uint cmd, ulong arg) | ||
183 | { | 182 | { |
184 | divert_ioctl dioctl; | 183 | divert_ioctl dioctl; |
185 | int i; | 184 | int i; |
@@ -258,6 +257,17 @@ isdn_divert_ioctl(struct inode *inode, struct file *file, | |||
258 | return copy_to_user((void __user *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0; | 257 | return copy_to_user((void __user *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0; |
259 | } /* isdn_divert_ioctl */ | 258 | } /* isdn_divert_ioctl */ |
260 | 259 | ||
260 | static long isdn_divert_ioctl(struct file *file, uint cmd, ulong arg) | ||
261 | { | ||
262 | long ret; | ||
263 | |||
264 | lock_kernel(); | ||
265 | ret = isdn_divert_ioctl_unlocked(file, cmd, arg); | ||
266 | unlock_kernel(); | ||
267 | |||
268 | return ret; | ||
269 | } | ||
270 | |||
261 | static const struct file_operations isdn_fops = | 271 | static const struct file_operations isdn_fops = |
262 | { | 272 | { |
263 | .owner = THIS_MODULE, | 273 | .owner = THIS_MODULE, |
@@ -265,7 +275,7 @@ static const struct file_operations isdn_fops = | |||
265 | .read = isdn_divert_read, | 275 | .read = isdn_divert_read, |
266 | .write = isdn_divert_write, | 276 | .write = isdn_divert_write, |
267 | .poll = isdn_divert_poll, | 277 | .poll = isdn_divert_poll, |
268 | .ioctl = isdn_divert_ioctl, | 278 | .unlocked_ioctl = isdn_divert_ioctl, |
269 | .open = isdn_divert_open, | 279 | .open = isdn_divert_open, |
270 | .release = isdn_divert_close, | 280 | .release = isdn_divert_close, |
271 | }; | 281 | }; |