From nobody Wed Apr 8 08:00:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD492C67871 for ; Mon, 24 Oct 2022 21:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232364AbiJXVIL (ORCPT ); Mon, 24 Oct 2022 17:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231974AbiJXVHn (ORCPT ); Mon, 24 Oct 2022 17:07:43 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3342914D20; Mon, 24 Oct 2022 12:14:50 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1F2E621BF0; Mon, 24 Oct 2022 14:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666622379; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=atmIPW4pkPtSzPiN6DQiWJf8LCKdXKDapj4r6ahHn6s=; b=rMvkFD4pVT61mPfUmVbAenV97V4QAIipqH2l4E48eJWx+giF535kqg4u1kGg2/HFBRQYD9 t12rKyjvbto/QZE4KbLAcDzIa2GmQJqPtLadiFs2oSzzJ5eFuI/A6xI/7UNwe3rZzMXse/ +fBTpwUig/Xo9+4lZbbQYw6lYNek7BY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666622379; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=atmIPW4pkPtSzPiN6DQiWJf8LCKdXKDapj4r6ahHn6s=; b=CahLQ35+Cy29a0PVeJ16FbzxPprgdMJqGE4RUyHKI1eJuFK+Z5zo/a95RWeHIfWrch1T6H hjNxA5M1zmeR3gDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EFBB413A79; Mon, 24 Oct 2022 14:39:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6lW5OaqjVmN3KAAAMHmgww (envelope-from ); Mon, 24 Oct 2022 14:39:38 +0000 From: Takashi Iwai To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , Sasha Levin , linux-kernel@vger.kernel.org Subject: [PATCH 6.0.y] Revert "ALSA: hda: Fix page fault in snd_hda_codec_shutdown()" Date: Mon, 24 Oct 2022 16:39:31 +0200 Message-Id: <20221024143931.15722-1-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This reverts commit 7494e2e6c55ed192f2b91c821fd6832744ba8741. Which was upstream commit f2bd1c5ae2cb0cf9525c9bffc0038c12dd7e1338. The patch caused a regression leading to the missing HD-audio device with ASoC SOF driver. It was a part of large series and backporting it alone breaks things while backporting the whole is too intrusive as stable changes. And, the issue the patch tries to address is a corner case, hence it's better to revert. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=3D216613 Signed-off-by: Takashi Iwai --- It's only for 6.0.y; 6.1-rc is fine sound/pci/hda/hda_codec.c | 41 ++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 4ae8b9574778..384426d7e9dd 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -931,28 +931,8 @@ snd_hda_codec_device_init(struct hda_bus *bus, unsigne= d int codec_addr, } =20 codec->bus =3D bus; - codec->depop_delay =3D -1; - codec->fixup_id =3D HDA_FIXUP_ID_NOT_SET; - codec->core.dev.release =3D snd_hda_codec_dev_release; - codec->core.exec_verb =3D codec_exec_verb; codec->core.type =3D HDA_DEV_LEGACY; =20 - mutex_init(&codec->spdif_mutex); - mutex_init(&codec->control_mutex); - snd_array_init(&codec->mixers, sizeof(struct hda_nid_item), 32); - snd_array_init(&codec->nids, sizeof(struct hda_nid_item), 32); - snd_array_init(&codec->init_pins, sizeof(struct hda_pincfg), 16); - snd_array_init(&codec->driver_pins, sizeof(struct hda_pincfg), 16); - snd_array_init(&codec->cvt_setups, sizeof(struct hda_cvt_setup), 8); - snd_array_init(&codec->spdif_out, sizeof(struct hda_spdif_out), 16); - snd_array_init(&codec->jacktbl, sizeof(struct hda_jack_tbl), 16); - snd_array_init(&codec->verbs, sizeof(struct hda_verb *), 8); - INIT_LIST_HEAD(&codec->conn_list); - INIT_LIST_HEAD(&codec->pcm_list_head); - INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work); - refcount_set(&codec->pcm_ref, 1); - init_waitqueue_head(&codec->remove_sleep); - return codec; } EXPORT_SYMBOL_GPL(snd_hda_codec_device_init); @@ -1005,8 +985,29 @@ int snd_hda_codec_device_new(struct hda_bus *bus, str= uct snd_card *card, if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) return -EINVAL; =20 + codec->core.dev.release =3D snd_hda_codec_dev_release; + codec->core.exec_verb =3D codec_exec_verb; + codec->card =3D card; codec->addr =3D codec_addr; + mutex_init(&codec->spdif_mutex); + mutex_init(&codec->control_mutex); + snd_array_init(&codec->mixers, sizeof(struct hda_nid_item), 32); + snd_array_init(&codec->nids, sizeof(struct hda_nid_item), 32); + snd_array_init(&codec->init_pins, sizeof(struct hda_pincfg), 16); + snd_array_init(&codec->driver_pins, sizeof(struct hda_pincfg), 16); + snd_array_init(&codec->cvt_setups, sizeof(struct hda_cvt_setup), 8); + snd_array_init(&codec->spdif_out, sizeof(struct hda_spdif_out), 16); + snd_array_init(&codec->jacktbl, sizeof(struct hda_jack_tbl), 16); + snd_array_init(&codec->verbs, sizeof(struct hda_verb *), 8); + INIT_LIST_HEAD(&codec->conn_list); + INIT_LIST_HEAD(&codec->pcm_list_head); + refcount_set(&codec->pcm_ref, 1); + init_waitqueue_head(&codec->remove_sleep); + + INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work); + codec->depop_delay =3D -1; + codec->fixup_id =3D HDA_FIXUP_ID_NOT_SET; =20 #ifdef CONFIG_PM codec->power_jiffies =3D jiffies; --=20 2.35.3