sound fixes for 5.1-rc6
Linus,
please pull sound fixes for v5.1-rc6 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-5.1-rc6
The topmost commit is b26e36b7ef36a8a3a147b1609b2505f8a4ecf511
----------------------------------------------------------------
sound fixes for 5.1-rc6
Two core fixes for long-standing bugs for the races at concurrent device creation and deletion that were (unsurprisingly) spotted by syzkaller with usb-fuzzer. The rest are usual small HD-audio fixes.
----------------------------------------------------------------
Hui Wang (1):
ALSA: hda/realtek - add two more pin configuration sets to quirk table
Takashi Iwai (3):
ALSA: hda: Initialize power_state field properly
ALSA: info: Fix racy addition/deletion of nodes
ALSA: core: Fix card races between register and disconnect
--- sound/core/info.c | 12 ++++++++++-- sound/core/init.c | 18 +++++++++--------- sound/pci/hda/hda_codec.c | 1 + sound/pci/hda/patch_realtek.c | 6 ++++++ 4 files changed, 26 insertions(+), 11 deletions(-)
sound/core/info.c +10 -2
@@ -713,8 +713,11 @@ snd_info_create_entry(const char *name, struct snd_info_entry *parent,INIT_LIST_HEAD (&entry->list); entry->parent = parent; entry->module = module; -if (parent) +if (parent) { +mutex_lock (&parent->access);list_add_tail (&entry->list, &parent->children); +mutex_unlock (&parent->access); + }return entry; }
@@ -792,7 +795,12 @@ void snd_info_free_entry(struct snd_info_entry * entry)list_for_each_entry_safe (p, n, &entry->children, list)snd_info_free_entry (p); -list_del (&entry->list); + p = entry->parent; +if (p) { +mutex_lock (&p->access); +list_del (&entry->list); +mutex_unlock (&p->access); + }kfree (entry->name);if (entry->private_free) entry->private_free (entry);
sound/core/init.c +9 -9
@@ -382,14 +382,7 @@ int snd_card_disconnect(struct snd_card *card) card->shutdown =1 ;spin_unlock (&card->files_lock); -/* phase 1: disable fops (user space) operations for ALSA API */ -mutex_lock (&snd_card_mutex); - snd_cards[card->number] =NULL ; -clear_bit (card->number, snd_cards_lock); -mutex_unlock (&snd_card_mutex); - -/* phase 2: replace file->f_op with special dummy operations */ - +/* replace file->f_op with special dummy operations */ spin_lock (&card->files_lock);list_for_each_entry (mfile, &card->files_list, list) {/* it's critical part, use endless loop */
@@ -405,7 +398,7 @@ int snd_card_disconnect(struct snd_card *card) }spin_unlock (&card->files_lock); -/* phase 3: notify all connected devices about disconnection */ +/* notify all connected devices about disconnection */ /* at this point, they cannot respond to any calls except release() */ #if IS_ENABLED (CONFIG_SND_MIXER_OSS )
@@ -421,6 +414,13 @@ int snd_card_disconnect(struct snd_card *card)device_del (&card->card_dev); card->registered = false; } + +/* disable fops (user space) operations for ALSA API */ +mutex_lock (&snd_card_mutex); + snd_cards[card->number] =NULL ; +clear_bit (card->number, snd_cards_lock); +mutex_unlock (&snd_card_mutex); +#ifdef CONFIG_PM wake_up (&card->power_sleep);#endif
sound/pci/hda/hda_codec.c +1 -0
@@ -969,6 +969,7 @@ int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,/* power-up all before initialization */ hda_set_power_state (codec,AC_PWRST_D0 ); + codec->core.dev.power.power_state =PMSG_ON ;snd_hda_codec_proc_new (codec);
sound/pci/hda/patch_realtek.c +6 -0
@@ -7266,6 +7266,8 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { {0x12, 0x90a60140}, {0x14, 0x90170150}, {0x21, 0x02211020}), +SND_HDA_PIN_QUIRK (0x10ec0236 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL1_MIC_NO_PRESENCE , + {0x21, 0x02211020}),SND_HDA_PIN_QUIRK (0x10ec0255 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL2_MIC_NO_PRESENCE , {0x14, 0x90170110}, {0x21, 0x02211020}),
@@ -7376,6 +7378,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { {0x21, 0x0221101f}), SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, ALC256_STANDARD_PINS), + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, + {0x14, 0x90170110}, + {0x1b, 0x01011020}, + {0x21, 0x0221101f}), SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, {0x14, 0x90170110}, {0x1b, 0x90a70130},
The pull request you sent on Sat, 20 Apr 2019 09:35:33 +0200:
The pull request you sent on Sat, 20 Apr 2019 09:35:33 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.gittags/sound-5.1-rc6
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/4b609f1e26f36c43e2dcdebe81e1d612705920d4
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker