WSL2-Linux-Kernel/sound
Takashi Iwai 0fbb027b44 ALSA: pcm: Fix double hw_free calls
The commit 66f2d19f81 ("ALSA: pcm: Fix memory leak at closing a
stream without hw_free") tried to fix the regression wrt the missing
hw_free call at closing without SNDRV_PCM_IOCTL_HW_FREE ioctl.
However, the code change dropped mistakenly the state check, resulting
in calling hw_free twice when SNDRV_PCM_IOCTL_HW_FRE got called
beforehand.  For most drivers, this is almost harmless, but the
drivers like SOF show another regression now.

This patch adds the state condition check before calling do_hw_free()
at releasing the stream for avoiding the double hw_free calls.

Fixes: 66f2d19f81 ("ALSA: pcm: Fix memory leak at closing a stream without hw_free")
Reported-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/s5hd0ajyprg.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-13 16:30:22 +01:00
..
ac97
aoa
arm
atmel
core ALSA: pcm: Fix double hw_free calls 2020-02-13 16:30:22 +01:00
drivers sound fixes for 5.6-rc1 2020-02-06 14:15:01 +00:00
firewire Merge branch 'for-linus' into for-next 2020-01-20 11:44:51 +01:00
hda ALSA: hda: Reset stream if DMA RUN bit not cleared 2020-01-28 10:29:41 +01:00
i2c
isa sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
mips
oss
parisc sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
pci ALSA: hda/realtek - Fix silent output on MSI-GL73 2020-02-12 09:11:19 +01:00
pcmcia
ppc
sh
soc sound fixes for 5.6-rc1 2020-02-06 14:15:01 +00:00
sparc
spi
synth
usb ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000 2020-02-13 07:18:58 +01:00
x86 sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
xen
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c