Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv23942/core

Modified Files:
        timer.c 
Log Message:
fixed the unbalanced spinlock at the error path.





Index: timer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/timer.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- timer.c     17 Oct 2003 13:59:48 -0000      1.50
+++ timer.c     20 Oct 2003 15:25:32 -0000      1.51
@@ -1706,20 +1706,20 @@
                                break;
                        }
                }
-               if (err < 0)
-                       break;
 
                spin_unlock_irq(&tu->qlock);
+               if (err < 0)
+                       goto _error;
 
                if (tu->tread) {
                        if (copy_to_user(buffer, &tu->tqueue[tu->qhead++], 
sizeof(snd_timer_tread_t))) {
                                err = -EFAULT;
-                               break;
+                               goto _error;
                        }
                } else {
                        if (copy_to_user(buffer, &tu->queue[tu->qhead++], 
sizeof(snd_timer_read_t))) {
                                err = -EFAULT;
-                               break;
+                               goto _error;
                        }
                }
 
@@ -1732,6 +1732,7 @@
                tu->qused--;
        }
        spin_unlock_irq(&tu->qlock);
+ _error:
        return result > 0 ? result : err;
 }
 



-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to