]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: fireworks: serialize transactions to update connections at bus reset
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 20 Feb 2016 07:41:01 +0000 (16:41 +0900)
committerTakashi Iwai <tiwai@suse.de>
Sat, 20 Feb 2016 14:46:38 +0000 (15:46 +0100)
commita7ee538cea51ac8942abe3876e4a3a7655c84516
tree3cc3de1b2ee2fa78970296bc949186aeeff6eac7
parent741482e3b939cf6d341773f709c84ccd5f1c01e7
ALSA: fireworks: serialize transactions to update connections at bus reset

In IEC 61883-1, at bus-reset, applications can continue isochronous
streaming by updating connections. In ALSA fireworks driver, the
operation is executed in 'update' handler for bus driver.

The connection resources are also changed in process contexts of PCM/MIDI
applications. Therefore, bus-reset handling has race condition
against connection. Current ALSA fireworks driver has a bug for the
condition.

This commit fixes the bug, by expand critical section with mutex. As a
result, connection updating operation in bus-reset handler and connection
changing operation in process context are serialized.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/fireworks/fireworks.c
sound/firewire/fireworks/fireworks_stream.c