diff options
| -rw-r--r-- | drivers/char/i8k.c | 21 | ||||
| -rw-r--r-- | drivers/isdn/divert/divert_procfs.c | 18 | ||||
| -rw-r--r-- | net/sunrpc/cache.c | 14 |
3 files changed, 40 insertions, 13 deletions
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index fc8cf7ac7f2b..4cd8b227c11f 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 3697c409bec6..724693c4d975 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
| 20 | #include <linux/isdnif.h> | 20 | #include <linux/isdnif.h> |
| 21 | #include <net/net_namespace.h> | 21 | #include <net/net_namespace.h> |
| 22 | #include <linux/smp_lock.h> | ||
| 22 | #include "isdn_divert.h" | 23 | #include "isdn_divert.h" |
| 23 | 24 | ||
| 24 | 25 | ||
| @@ -176,9 +177,7 @@ isdn_divert_close(struct inode *ino, struct file *filep) | |||
| 176 | /*********/ | 177 | /*********/ |
| 177 | /* IOCTL */ | 178 | /* IOCTL */ |
| 178 | /*********/ | 179 | /*********/ |
| 179 | static int | 180 | static int isdn_divert_ioctl_unlocked(struct file *file, uint cmd, ulong arg) |
| 180 | isdn_divert_ioctl(struct inode *inode, struct file *file, | ||
| 181 | uint cmd, ulong arg) | ||
| 182 | { | 181 | { |
| 183 | divert_ioctl dioctl; | 182 | divert_ioctl dioctl; |
| 184 | int i; | 183 | int i; |
| @@ -257,6 +256,17 @@ isdn_divert_ioctl(struct inode *inode, struct file *file, | |||
| 257 | return copy_to_user((void __user *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0; | 256 | return copy_to_user((void __user *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0; |
| 258 | } /* isdn_divert_ioctl */ | 257 | } /* isdn_divert_ioctl */ |
| 259 | 258 | ||
| 259 | static long isdn_divert_ioctl(struct file *file, uint cmd, ulong arg) | ||
| 260 | { | ||
| 261 | long ret; | ||
| 262 | |||
| 263 | lock_kernel(); | ||
| 264 | ret = isdn_divert_ioctl_unlocked(file, cmd, arg); | ||
| 265 | unlock_kernel(); | ||
| 266 | |||
| 267 | return ret; | ||
| 268 | } | ||
| 269 | |||
| 260 | static const struct file_operations isdn_fops = | 270 | static const struct file_operations isdn_fops = |
| 261 | { | 271 | { |
| 262 | .owner = THIS_MODULE, | 272 | .owner = THIS_MODULE, |
| @@ -264,7 +274,7 @@ static const struct file_operations isdn_fops = | |||
| 264 | .read = isdn_divert_read, | 274 | .read = isdn_divert_read, |
| 265 | .write = isdn_divert_write, | 275 | .write = isdn_divert_write, |
| 266 | .poll = isdn_divert_poll, | 276 | .poll = isdn_divert_poll, |
| 267 | .ioctl = isdn_divert_ioctl, | 277 | .unlocked_ioctl = isdn_divert_ioctl, |
| 268 | .open = isdn_divert_open, | 278 | .open = isdn_divert_open, |
| 269 | .release = isdn_divert_close, | 279 | .release = isdn_divert_close, |
| 270 | }; | 280 | }; |
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 39bddba53ba1..95690a8a4d80 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
| @@ -1331,12 +1331,18 @@ static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait) | |||
| 1331 | return cache_poll(filp, wait, cd); | 1331 | return cache_poll(filp, wait, cd); |
| 1332 | } | 1332 | } |
| 1333 | 1333 | ||
| 1334 | static int cache_ioctl_procfs(struct inode *inode, struct file *filp, | 1334 | static long cache_ioctl_procfs(struct file *filp, |
| 1335 | unsigned int cmd, unsigned long arg) | 1335 | unsigned int cmd, unsigned long arg) |
| 1336 | { | 1336 | { |
| 1337 | long ret; | ||
| 1338 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
| 1337 | struct cache_detail *cd = PDE(inode)->data; | 1339 | struct cache_detail *cd = PDE(inode)->data; |
| 1338 | 1340 | ||
| 1339 | return cache_ioctl(inode, filp, cmd, arg, cd); | 1341 | lock_kernel(); |
| 1342 | ret = cache_ioctl(inode, filp, cmd, arg, cd); | ||
| 1343 | unlock_kernel(); | ||
| 1344 | |||
| 1345 | return ret; | ||
| 1340 | } | 1346 | } |
| 1341 | 1347 | ||
| 1342 | static int cache_open_procfs(struct inode *inode, struct file *filp) | 1348 | static int cache_open_procfs(struct inode *inode, struct file *filp) |
| @@ -1359,7 +1365,7 @@ static const struct file_operations cache_file_operations_procfs = { | |||
| 1359 | .read = cache_read_procfs, | 1365 | .read = cache_read_procfs, |
| 1360 | .write = cache_write_procfs, | 1366 | .write = cache_write_procfs, |
| 1361 | .poll = cache_poll_procfs, | 1367 | .poll = cache_poll_procfs, |
| 1362 | .ioctl = cache_ioctl_procfs, /* for FIONREAD */ | 1368 | .unlocked_ioctl = cache_ioctl_procfs, /* for FIONREAD */ |
| 1363 | .open = cache_open_procfs, | 1369 | .open = cache_open_procfs, |
| 1364 | .release = cache_release_procfs, | 1370 | .release = cache_release_procfs, |
| 1365 | }; | 1371 | }; |
