android_kernel_samsung_msm8976/sound
Takashi Iwai 7135d2e3c3 ALSA: pcm: Call snd_pcm_unlink() conditionally at closing
commit b51abed8355e5556886623b2772fa6b7598d2282 upstream.

Currently the PCM core calls snd_pcm_unlink() always unconditionally
at closing a stream.  However, since snd_pcm_unlink() invokes the
global rwsem down, the lock can be easily contended.  More badly, when
a thread runs in a high priority RT-FIFO, it may stall at spinning.

Basically the call of snd_pcm_unlink() is required only for the linked
streams that are already rare occasion.  For normal use cases, this
code path is fairly superfluous.

As an optimization (and also as a workaround for the RT problem
above in normal situations without linked streams), this patch adds a
check before calling snd_pcm_unlink() and calls it only when needed.

Reported-by: Chanho Min <chanho.min@lge.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-27 21:53:07 +02:00
..
aoa
arm ASoC: fix broken pxa SoC support 2015-10-22 14:37:50 -07:00
atmel
core ALSA: pcm: Call snd_pcm_unlink() conditionally at closing 2019-07-27 21:53:07 +02:00
drivers ALSA: aloop: Fix racy hw constraints adjustment 2019-07-27 21:46:27 +02:00
firewire
i2c
isa
mips
oss
parisc
pci This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
pcmcia
ppc
sh
soc ASoC: msm: qdspv2: initialize variables before use 2019-07-27 21:51:25 +02:00
sparc
spi
synth ALSA: synth: Fix conflicting OSS device registration on AWE32 2015-10-22 14:37:50 -07:00
usb ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU 2019-07-27 21:46:20 +02:00
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c
sound_firmware.c