]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/oss/swarm_cs4297a.c
Use f_lock to protect f_flags
[linux-2.6-omap-h63xx.git] / sound / oss / swarm_cs4297a.c
index 41562ecde5bbd9fcc6cc41a1b0c5ec1b5f14a181..1edab7b4ea83b26a41311671983d65625d0edb33 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: