android_kernel_oneplus_msm8998/sound/firewire/fireworks
Takashi Sakamoto e6c4138bc1 ALSA: fireworks: accessing to user space outside spinlock
commit 6b1ca4bcadf9ef077cc5f03c6822ba276ed14902 upstream.

In hwdep interface of fireworks driver, accessing to user space is in a
critical section with disabled local interrupt. Depending on architecture,
accessing to user space can cause page fault exception. Then local
processor stores machine status and handles the synchronous event. A
handler corresponding to the event can call task scheduler to wait for
preparing pages. In a case of usage of single core processor, the state to
disable local interrupt is worse because it don't handle usual interrupts
from hardware.

This commit fixes this bug, performing the accessing outside spinlock. This
commit also gives up counting the number of queued response messages to
simplify ring-buffer management.

Reported-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Fixes: 555e8a8f7f14('ALSA: fireworks: Add command/response functionality into hwdep interface')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-15 08:27:53 +02:00
..
fireworks.c ALSA: firewire-lib: rename macros with AM824 prefix 2015-09-29 12:50:23 +02:00
fireworks.h ALSA: fireworks: accessing to user space outside spinlock 2016-09-15 08:27:53 +02:00
fireworks_command.c ALSA: fireworks: use u32 type for be32_to_cpup() macro 2015-10-19 11:57:02 +02:00
fireworks_hwdep.c ALSA: fireworks: accessing to user space outside spinlock 2016-09-15 08:27:53 +02:00
fireworks_midi.c ALSA: firewire-lib: move MIDI trigger helper function to AM824 layer 2015-09-29 12:48:49 +02:00
fireworks_pcm.c ALSA: firewire-lib: rename macros with AM824 prefix 2015-09-29 12:50:23 +02:00
fireworks_proc.c ALSA: fireworks: accessing to user space outside spinlock 2016-09-15 08:27:53 +02:00
fireworks_stream.c ALSA: firewire-lib: rename parameter setting function for AM824 with FDF field 2015-09-29 12:48:02 +02:00
fireworks_transaction.c ALSA: fireworks: accessing to user space outside spinlock 2016-09-15 08:27:53 +02:00
Makefile ALSA: fireworks/bebob/oxfw/dice: enable to make as built-in 2015-10-18 09:08:11 +02:00