Update of /cvsroot/alsa/alsa-kernel/core/ioctl32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv738/core/ioctl32

Modified Files:
        ioctl32.c 
Log Message:
- fixed the oops in OSS mixer when the control elements are dynamically
  changed (e.g. emufx).
  mixer_oss.c handles the numid instead of kcontrol_t pointers.
- snd_ctl_find_id and snd_ctl_find_numid don't issue contros_rwsem.
  the caller has to handle it properly.


Index: ioctl32.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/ioctl32/ioctl32.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ioctl32.c   4 Sep 2003 09:09:21 -0000       1.18
+++ ioctl32.c   26 Jan 2004 11:48:40 -0000      1.19
@@ -259,12 +259,15 @@
 
        ctl = snd_magic_cast(snd_ctl_file_t, file->private_data, return -ENXIO);
 
+       down_read(&ctl->card->controls_rwsem);
        kctl = snd_ctl_find_id(ctl->card, id);
        if (! kctl) {
+               up_read(&ctl->card->controls_rwsem);
                return -ENXIO;
        }
        info.id = *id;
        err = kctl->info(kctl, &info);
+       up_read(&ctl->card->controls_rwsem);
        if (err >= 0)
                err = info.type;
        return err;



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to