mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
ALSA: firewire-tascam: fix corruption due to spin lock without restoration in SoftIRQ context
commit747d1f076d
upstream. ALSA firewire-tascam driver can bring corruption due to spin lock without restoration of IRQ flag in SoftIRQ context. This commit fixes the bug. Cc: Scott Bahling <sbahling@suse.com> Cc: <stable@vger.kernel.org> # v4.21 Fixes:d716742243
("ALSA: firewire-tascam: queue events for change of control surface") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20200113085719.26788-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1990603db1
commit
4b536fe632
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue