diff options
Diffstat (limited to 'sound/oss/vwsnd.c')
-rw-r--r-- | sound/oss/vwsnd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c index 20b3b325aa80..99c94c48558c 100644 --- a/sound/oss/vwsnd.c +++ b/sound/oss/vwsnd.c | |||
@@ -2921,6 +2921,7 @@ static int vwsnd_audio_open(struct inode *inode, struct file *file) | |||
2921 | 2921 | ||
2922 | DBGE("(inode=0x%p, file=0x%p)\n", inode, file); | 2922 | DBGE("(inode=0x%p, file=0x%p)\n", inode, file); |
2923 | 2923 | ||
2924 | lock_kernel(); | ||
2924 | INC_USE_COUNT; | 2925 | INC_USE_COUNT; |
2925 | for (devc = vwsnd_dev_list; devc; devc = devc->next_dev) | 2926 | for (devc = vwsnd_dev_list; devc; devc = devc->next_dev) |
2926 | if ((devc->audio_minor & ~0x0F) == (minor & ~0x0F)) | 2927 | if ((devc->audio_minor & ~0x0F) == (minor & ~0x0F)) |
@@ -2928,6 +2929,7 @@ static int vwsnd_audio_open(struct inode *inode, struct file *file) | |||
2928 | 2929 | ||
2929 | if (devc == NULL) { | 2930 | if (devc == NULL) { |
2930 | DEC_USE_COUNT; | 2931 | DEC_USE_COUNT; |
2932 | unlock_kernel(); | ||
2931 | return -ENODEV; | 2933 | return -ENODEV; |
2932 | } | 2934 | } |
2933 | 2935 | ||
@@ -2936,11 +2938,13 @@ static int vwsnd_audio_open(struct inode *inode, struct file *file) | |||
2936 | mutex_unlock(&devc->open_mutex); | 2938 | mutex_unlock(&devc->open_mutex); |
2937 | if (file->f_flags & O_NONBLOCK) { | 2939 | if (file->f_flags & O_NONBLOCK) { |
2938 | DEC_USE_COUNT; | 2940 | DEC_USE_COUNT; |
2941 | unlock_kernel(); | ||
2939 | return -EBUSY; | 2942 | return -EBUSY; |
2940 | } | 2943 | } |
2941 | interruptible_sleep_on(&devc->open_wait); | 2944 | interruptible_sleep_on(&devc->open_wait); |
2942 | if (signal_pending(current)) { | 2945 | if (signal_pending(current)) { |
2943 | DEC_USE_COUNT; | 2946 | DEC_USE_COUNT; |
2947 | unlock_kernel(); | ||
2944 | return -ERESTARTSYS; | 2948 | return -ERESTARTSYS; |
2945 | } | 2949 | } |
2946 | mutex_lock(&devc->open_mutex); | 2950 | mutex_lock(&devc->open_mutex); |
@@ -2993,6 +2997,7 @@ static int vwsnd_audio_open(struct inode *inode, struct file *file) | |||
2993 | 2997 | ||
2994 | file->private_data = devc; | 2998 | file->private_data = devc; |
2995 | DBGRV(); | 2999 | DBGRV(); |
3000 | unlock_kernel(); | ||
2996 | return 0; | 3001 | return 0; |
2997 | } | 3002 | } |
2998 | 3003 | ||
@@ -3062,15 +3067,18 @@ static int vwsnd_mixer_open(struct inode *inode, struct file *file) | |||
3062 | DBGEV("(inode=0x%p, file=0x%p)\n", inode, file); | 3067 | DBGEV("(inode=0x%p, file=0x%p)\n", inode, file); |
3063 | 3068 | ||
3064 | INC_USE_COUNT; | 3069 | INC_USE_COUNT; |
3070 | lock_kernel(); | ||
3065 | for (devc = vwsnd_dev_list; devc; devc = devc->next_dev) | 3071 | for (devc = vwsnd_dev_list; devc; devc = devc->next_dev) |
3066 | if (devc->mixer_minor == iminor(inode)) | 3072 | if (devc->mixer_minor == iminor(inode)) |
3067 | break; | 3073 | break; |
3068 | 3074 | ||
3069 | if (devc == NULL) { | 3075 | if (devc == NULL) { |
3070 | DEC_USE_COUNT; | 3076 | DEC_USE_COUNT; |
3077 | unlock_kernel(); | ||
3071 | return -ENODEV; | 3078 | return -ENODEV; |
3072 | } | 3079 | } |
3073 | file->private_data = devc; | 3080 | file->private_data = devc; |
3081 | unlock_kernel(); | ||
3074 | return 0; | 3082 | return 0; |
3075 | } | 3083 | } |
3076 | 3084 | ||