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

Modified Files:
        seq.c seq_clientmgr.c 
Log Message:
export snd_seq_set_queue_tempo() for OSS to prevent calling
snd_seq_kernel_client_ctl() (using copy_from_user()) in interrupt
context

Index: seq.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- seq.c       26 Apr 2004 07:31:23 -0000      1.12
+++ seq.c       24 May 2004 12:31:18 -0000      1.13
@@ -133,6 +133,7 @@
 EXPORT_SYMBOL(snd_seq_kernel_client_dispatch);
 EXPORT_SYMBOL(snd_seq_kernel_client_ctl);
 EXPORT_SYMBOL(snd_seq_kernel_client_write_poll);
+EXPORT_SYMBOL(snd_seq_set_queue_tempo);
   /* seq_memory.c */
 EXPORT_SYMBOL(snd_seq_expand_var_event);
 EXPORT_SYMBOL(snd_seq_dump_var_event);

Index: seq_clientmgr.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_clientmgr.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- seq_clientmgr.c     23 Feb 2004 10:50:22 -0000      1.28
+++ seq_clientmgr.c     24 May 2004 12:31:18 -0000      1.29
@@ -1694,6 +1694,13 @@
 
 
 /* SET_QUEUE_TEMPO ioctl() */
+int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo)
+{
+       if (!snd_seq_queue_check_access(tempo->queue, client))
+               return -EPERM;
+       return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo);
+}
+
 static int snd_seq_ioctl_set_queue_tempo(client_t * client, void __user *arg)
 {
        int result;
@@ -1702,15 +1709,8 @@
        if (copy_from_user(&tempo, arg, sizeof(tempo)))
                return -EFAULT;
 
-       if (snd_seq_queue_check_access(tempo.queue, client->number)) {
-               result = snd_seq_queue_timer_set_tempo(tempo.queue, client->number, 
&tempo);
-               if (result < 0)
-                       return result;
-       } else {
-               return -EPERM;
-       }       
-
-       return 0;
+       result = snd_seq_set_queue_tempo(client->number, &tempo);
+       return result < 0 ? result : 0;
 }
 
 



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to