ALSA: firewire-tascam: fix corruption due to spin lock without restoration in SoftIRQ...
[sfrench/cifs-2.6.git] / sound / firewire / tascam / amdtp-tascam.c
index e80bb84c43f6780fc7006fd3930b2c546e80b2e3..f823a2ab3544bf769101e5c263b7e7d3ca96dd74 100644 (file)
@@ -157,14 +157,15 @@ static void read_status_messages(struct amdtp_stream *s,
                        if ((before ^ after) & mask) {
                                struct snd_firewire_tascam_change *entry =
                                                &tscm->queue[tscm->push_pos];
+                               unsigned long flag;
 
-                               spin_lock_irq(&tscm->lock);
+                               spin_lock_irqsave(&tscm->lock, flag);
                                entry->index = index;
                                entry->before = before;
                                entry->after = after;
                                if (++tscm->push_pos >= SND_TSCM_QUEUE_COUNT)
                                        tscm->push_pos = 0;
-                               spin_unlock_irq(&tscm->lock);
+                               spin_unlock_irqrestore(&tscm->lock, flag);
 
                                wake_up(&tscm->hwdep_wait);
                        }