diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/capi.c | 17 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/divamnt.c | 16 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/divasi.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/divasmain.c | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 3 |
5 files changed, 28 insertions, 12 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 6ca0bb949ad3..2095153582f1 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/signal.h> | 20 | #include <linux/signal.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/smp_lock.h> | ||
23 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
24 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
25 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE | 26 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE |
@@ -983,13 +984,17 @@ capi_ioctl(struct inode *inode, struct file *file, | |||
983 | static int | 984 | static int |
984 | capi_open(struct inode *inode, struct file *file) | 985 | capi_open(struct inode *inode, struct file *file) |
985 | { | 986 | { |
987 | int ret; | ||
988 | |||
989 | lock_kernel(); | ||
986 | if (file->private_data) | 990 | if (file->private_data) |
987 | return -EEXIST; | 991 | ret = -EEXIST; |
988 | 992 | else if ((file->private_data = capidev_alloc()) == NULL) | |
989 | if ((file->private_data = capidev_alloc()) == NULL) | 993 | ret = -ENOMEM; |
990 | return -ENOMEM; | 994 | else |
991 | 995 | ret = nonseekable_open(inode, file); | |
992 | return nonseekable_open(inode, file); | 996 | unlock_kernel(); |
997 | return ret; | ||
993 | } | 998 | } |
994 | 999 | ||
995 | static int | 1000 | static int |
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c index c90928974249..1e85f743214e 100644 --- a/drivers/isdn/hardware/eicon/divamnt.c +++ b/drivers/isdn/hardware/eicon/divamnt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
17 | #include <linux/smp_lock.h> | ||
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
18 | 19 | ||
19 | #include "platform.h" | 20 | #include "platform.h" |
@@ -127,14 +128,19 @@ static unsigned int maint_poll(struct file *file, poll_table * wait) | |||
127 | 128 | ||
128 | static int maint_open(struct inode *ino, struct file *filep) | 129 | static int maint_open(struct inode *ino, struct file *filep) |
129 | { | 130 | { |
131 | int ret; | ||
132 | |||
133 | lock_kernel(); | ||
130 | /* only one open is allowed, so we test | 134 | /* only one open is allowed, so we test |
131 | it atomically */ | 135 | it atomically */ |
132 | if (test_and_set_bit(0, &opened)) | 136 | if (test_and_set_bit(0, &opened)) |
133 | return (-EBUSY); | 137 | ret = -EBUSY; |
134 | 138 | else { | |
135 | filep->private_data = NULL; | 139 | filep->private_data = NULL; |
136 | 140 | ret = nonseekable_open(ino, filep); | |
137 | return nonseekable_open(ino, filep); | 141 | } |
142 | unlock_kernel(); | ||
143 | return ret; | ||
138 | } | 144 | } |
139 | 145 | ||
140 | static int maint_close(struct inode *ino, struct file *filep) | 146 | static int maint_close(struct inode *ino, struct file *filep) |
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c index 78f141e77466..f4969fe0a055 100644 --- a/drivers/isdn/hardware/eicon/divasi.c +++ b/drivers/isdn/hardware/eicon/divasi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/poll.h> | 17 | #include <linux/poll.h> |
18 | #include <linux/proc_fs.h> | 18 | #include <linux/proc_fs.h> |
19 | #include <linux/skbuff.h> | 19 | #include <linux/skbuff.h> |
20 | #include <linux/smp_lock.h> | ||
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
21 | 22 | ||
22 | #include "platform.h" | 23 | #include "platform.h" |
@@ -400,6 +401,7 @@ static unsigned int um_idi_poll(struct file *file, poll_table * wait) | |||
400 | 401 | ||
401 | static int um_idi_open(struct inode *inode, struct file *file) | 402 | static int um_idi_open(struct inode *inode, struct file *file) |
402 | { | 403 | { |
404 | cycle_kernel_lock(); | ||
403 | return (0); | 405 | return (0); |
404 | } | 406 | } |
405 | 407 | ||
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 16a874bb1561..fbbcb27fb681 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
23 | #include <linux/kmod.h> | 23 | #include <linux/kmod.h> |
24 | #include <linux/smp_lock.h> | ||
24 | 25 | ||
25 | #include "platform.h" | 26 | #include "platform.h" |
26 | #undef ID_MASK | 27 | #undef ID_MASK |
@@ -580,6 +581,7 @@ xdi_copy_from_user(void *os_handle, void *dst, const void __user *src, int lengt | |||
580 | */ | 581 | */ |
581 | static int divas_open(struct inode *inode, struct file *file) | 582 | static int divas_open(struct inode *inode, struct file *file) |
582 | { | 583 | { |
584 | cycle_kernel_lock(); | ||
583 | return (0); | 585 | return (0); |
584 | } | 586 | } |
585 | 587 | ||
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 8d8c6b736167..7188c59a76ff 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -1732,7 +1732,7 @@ isdn_open(struct inode *ino, struct file *filep) | |||
1732 | int chidx; | 1732 | int chidx; |
1733 | int retval = -ENODEV; | 1733 | int retval = -ENODEV; |
1734 | 1734 | ||
1735 | 1735 | lock_kernel(); | |
1736 | if (minor == ISDN_MINOR_STATUS) { | 1736 | if (minor == ISDN_MINOR_STATUS) { |
1737 | infostruct *p; | 1737 | infostruct *p; |
1738 | 1738 | ||
@@ -1783,6 +1783,7 @@ isdn_open(struct inode *ino, struct file *filep) | |||
1783 | #endif | 1783 | #endif |
1784 | out: | 1784 | out: |
1785 | nonseekable_open(ino, filep); | 1785 | nonseekable_open(ino, filep); |
1786 | unlock_kernel(); | ||
1786 | return retval; | 1787 | return retval; |
1787 | } | 1788 | } |
1788 | 1789 | ||