]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - sound/oss/sh_dac_audio.c
Use f_lock to protect f_flags
[net-next-2.6.git] / sound / oss / sh_dac_audio.c
index e5d4239949182fd5649456e524436a7fb515e39e..78cfb66e4c59cecf83c51d55b8b7f7baf9bf683b 100644 (file)
@@ -135,7 +135,9 @@ static int dac_audio_ioctl(struct inode *inode, struct file *file,
                return put_user(AFMT_U8, (int *)arg);
 
        case SNDCTL_DSP_NONBLOCK:
+               spin_lock(&file->f_lock);
                file->f_flags |= O_NONBLOCK;
+               spin_unlock(&file->f_lock);
                return 0;
 
        case SNDCTL_DSP_GETCAPS: