linux_dsm_epyc7002/sound/pci
Lukas Wunner 6e8aeda224 ALSA: hda/hdmi - Fix duplicate unref of pci_dev
Nicholas Johnson reports a null pointer deref as well as a refcount
underflow upon hot-removal of a Thunderbolt-attached AMD eGPU.
He's bisected the issue down to commit 586bc4aab8 ("ALSA: hda/hdmi -
fix vgaswitcheroo detection for AMD").

The commit iterates over PCI devices using pci_get_class() and
unreferences each device found, even though pci_get_class()
subsequently unreferences the device as well.  Fix it.

Fixes: 586bc4aab8 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD")
Link: https://lore.kernel.org/r/PSXP216MB0438BFEAA0617283A834E11580580@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM/
Reported-and-tested-by: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Alexander Deucher <alexander.deucher@amd.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Link: https://lore.kernel.org/r/77aa6c01aefe1ebc4004e87b0bc714f2759f15c4.1575985006.git.lukas@wunner.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-10 18:20:31 +01:00
..
ac97 ALSA: ac97: remove unused variable 'snd_ac97_controls_master_mono' 2019-08-09 11:28:43 +02:00
ali5451 ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
asihpi ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
au88x0 ALSA: au88x0: Fix incorrect device pointer for preallocation 2019-11-12 15:33:52 +01:00
aw2 ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
ca0106 ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
cs46xx ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
cs5535audio ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
ctxfi ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
echoaudio ALSA: echoaudio: simplify get_audio_levels 2019-12-08 09:47:43 +01:00
emu10k1 ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
hda ALSA: hda/hdmi - Fix duplicate unref of pci_dev 2019-12-10 18:20:31 +01:00
ice1712 ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
korg1212 ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
lola ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
lx6464es ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
mixart ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
nm256 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
oxygen ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
pcxhr ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
riptide ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
rme9652 ALSA: rme: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
trident ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
vx222 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ymfpci ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
ad1889.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
ad1889.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ak4531_codec.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
als300.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
als4000.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
atiixp_modem.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
atiixp.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
azt3328.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
azt3328.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bt87x.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
cmipci.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
cs4281.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
cs5530.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
ens1370.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
ens1371.c
es1938.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
es1968.c ALSA: es1968: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
fm801.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
intel8x0.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
intel8x0m.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
Kconfig sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
maestro3.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rme32.c ALSA: rme32: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
rme96.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sis7019.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
sis7019.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 274 2019-06-05 17:30:30 +02:00
sonicvibes.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
via82xx_modem.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
via82xx.c ALSA: pci: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00