Use f_lock to protect f_flags
[linux-flexiantxendom0-natty.git] / sound / oss / swarm_cs4297a.c
index 41562ec..1edab7b 100644 (file)
@@ -2200,7 +2200,9 @@ static int cs4297a_ioctl(struct inode *inode, struct file *file,
                                    sizeof(abinfo)) ? -EFAULT : 0;
 
        case SNDCTL_DSP_NONBLOCK:
+               spin_lock(&file->f_lock);
                file->f_flags |= O_NONBLOCK;
+               spin_unlock(&file->f_lock);
                return 0;
 
        case SNDCTL_DSP_GETODELAY: