diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
commit | f13771187b9423b824f32518319f6da85d819003 (patch) | |
tree | c431cf16c286065a302d5f3fb43fc1abac7e4047 /drivers/isdn | |
parent | 15953654cc312429740fd58fb37a5a3d63a54376 (diff) | |
parent | 9f37af654fda88a8dcca74c785f6c20e52758866 (diff) |
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
uml: Pushdown the bkl from harddog_kern ioctl
sunrpc: Pushdown the bkl from sunrpc cache ioctl
sunrpc: Pushdown the bkl from ioctl
autofs4: Pushdown the bkl from ioctl
uml: Convert to unlocked_ioctls to remove implicit BKL
ncpfs: BKL ioctl pushdown
coda: Clean-up whitespace problems in pioctl.c
coda: BKL ioctl pushdown
drivers: Push down BKL into various drivers
isdn: Push down BKL into ioctl functions
scsi: Push down BKL into ioctl functions
dvb: Push down BKL into ioctl functions
smbfs: Push down BKL into ioctl function
coda/psdev: Remove BKL from ioctl function
um/mmapper: Remove BKL usage
sn_hwperf: Kill BKL usage
hfsplus: Push down BKL into ioctl function
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/capi.c | 17 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 18 | ||||
-rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 10 |
3 files changed, 35 insertions, 10 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index ee5837522f5..0cabe31f26d 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -787,8 +787,7 @@ capi_poll(struct file *file, poll_table * wait) | |||
787 | } | 787 | } |
788 | 788 | ||
789 | static int | 789 | static int |
790 | capi_ioctl(struct inode *inode, struct file *file, | 790 | capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
791 | unsigned int cmd, unsigned long arg) | ||
792 | { | 791 | { |
793 | struct capidev *cdev = file->private_data; | 792 | struct capidev *cdev = file->private_data; |
794 | capi_ioctl_struct data; | 793 | capi_ioctl_struct data; |
@@ -981,6 +980,18 @@ register_out: | |||
981 | } | 980 | } |
982 | } | 981 | } |
983 | 982 | ||
983 | static long | ||
984 | capi_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
985 | { | ||
986 | int ret; | ||
987 | |||
988 | lock_kernel(); | ||
989 | ret = capi_ioctl(file, cmd, arg); | ||
990 | unlock_kernel(); | ||
991 | |||
992 | return ret; | ||
993 | } | ||
994 | |||
984 | static int capi_open(struct inode *inode, struct file *file) | 995 | static int capi_open(struct inode *inode, struct file *file) |
985 | { | 996 | { |
986 | struct capidev *cdev; | 997 | struct capidev *cdev; |
@@ -1026,7 +1037,7 @@ static const struct file_operations capi_fops = | |||
1026 | .read = capi_read, | 1037 | .read = capi_read, |
1027 | .write = capi_write, | 1038 | .write = capi_write, |
1028 | .poll = capi_poll, | 1039 | .poll = capi_poll, |
1029 | .ioctl = capi_ioctl, | 1040 | .unlocked_ioctl = capi_unlocked_ioctl, |
1030 | .open = capi_open, | 1041 | .open = capi_open, |
1031 | .release = capi_release, | 1042 | .release = capi_release, |
1032 | }; | 1043 | }; |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 70044ee4b22..a44cdb492ea 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -1272,9 +1272,9 @@ isdn_poll(struct file *file, poll_table * wait) | |||
1272 | 1272 | ||
1273 | 1273 | ||
1274 | static int | 1274 | static int |
1275 | isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) | 1275 | isdn_ioctl(struct file *file, uint cmd, ulong arg) |
1276 | { | 1276 | { |
1277 | uint minor = iminor(inode); | 1277 | uint minor = iminor(file->f_path.dentry->d_inode); |
1278 | isdn_ctrl c; | 1278 | isdn_ctrl c; |
1279 | int drvidx; | 1279 | int drvidx; |
1280 | int chidx; | 1280 | int chidx; |
@@ -1722,6 +1722,18 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) | |||
1722 | #undef cfg | 1722 | #undef cfg |
1723 | } | 1723 | } |
1724 | 1724 | ||
1725 | static long | ||
1726 | isdn_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
1727 | { | ||
1728 | int ret; | ||
1729 | |||
1730 | lock_kernel(); | ||
1731 | ret = isdn_ioctl(file, cmd, arg); | ||
1732 | unlock_kernel(); | ||
1733 | |||
1734 | return ret; | ||
1735 | } | ||
1736 | |||
1725 | /* | 1737 | /* |
1726 | * Open the device code. | 1738 | * Open the device code. |
1727 | */ | 1739 | */ |
@@ -1838,7 +1850,7 @@ static const struct file_operations isdn_fops = | |||
1838 | .read = isdn_read, | 1850 | .read = isdn_read, |
1839 | .write = isdn_write, | 1851 | .write = isdn_write, |
1840 | .poll = isdn_poll, | 1852 | .poll = isdn_poll, |
1841 | .ioctl = isdn_ioctl, | 1853 | .unlocked_ioctl = isdn_unlocked_ioctl, |
1842 | .open = isdn_open, | 1854 | .open = isdn_open, |
1843 | .release = isdn_close, | 1855 | .release = isdn_close, |
1844 | }; | 1856 | }; |
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 8785004e85e..c3243c913ec 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/miscdevice.h> | 24 | #include <linux/miscdevice.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/mISDNif.h> | 26 | #include <linux/mISDNif.h> |
27 | #include <linux/smp_lock.h> | ||
27 | #include "core.h" | 28 | #include "core.h" |
28 | 29 | ||
29 | static u_int *debug; | 30 | static u_int *debug; |
@@ -215,9 +216,8 @@ unlock: | |||
215 | return ret; | 216 | return ret; |
216 | } | 217 | } |
217 | 218 | ||
218 | static int | 219 | static long |
219 | mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | 220 | mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) |
220 | unsigned long arg) | ||
221 | { | 221 | { |
222 | struct mISDNtimerdev *dev = filep->private_data; | 222 | struct mISDNtimerdev *dev = filep->private_data; |
223 | int id, tout, ret = 0; | 223 | int id, tout, ret = 0; |
@@ -226,6 +226,7 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
226 | if (*debug & DEBUG_TIMER) | 226 | if (*debug & DEBUG_TIMER) |
227 | printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__, | 227 | printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__, |
228 | filep, cmd, arg); | 228 | filep, cmd, arg); |
229 | lock_kernel(); | ||
229 | switch (cmd) { | 230 | switch (cmd) { |
230 | case IMADDTIMER: | 231 | case IMADDTIMER: |
231 | if (get_user(tout, (int __user *)arg)) { | 232 | if (get_user(tout, (int __user *)arg)) { |
@@ -257,13 +258,14 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
257 | default: | 258 | default: |
258 | ret = -EINVAL; | 259 | ret = -EINVAL; |
259 | } | 260 | } |
261 | unlock_kernel(); | ||
260 | return ret; | 262 | return ret; |
261 | } | 263 | } |
262 | 264 | ||
263 | static const struct file_operations mISDN_fops = { | 265 | static const struct file_operations mISDN_fops = { |
264 | .read = mISDN_read, | 266 | .read = mISDN_read, |
265 | .poll = mISDN_poll, | 267 | .poll = mISDN_poll, |
266 | .ioctl = mISDN_ioctl, | 268 | .unlocked_ioctl = mISDN_ioctl, |
267 | .open = mISDN_open, | 269 | .open = mISDN_open, |
268 | .release = mISDN_close, | 270 | .release = mISDN_close, |
269 | }; | 271 | }; |