From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387844; b=GbBHZg/4OyiNqCW07fIsxiKl18f/uiN2xHGwkqaUwgZFHPrnyPNX2jouW9SwIuVc1kUb FxB499TuFMpbwcTJju4IEXMlHqqOdeBTOSInEGZLw5935afNMVmivByjO1+mopcYpFfDl DJX+ZgbLEo1SbMA5vzsX8l0SEuK3nVrtBD0o1Uhg6Tr2xCkhdrlFh0pKXgqw15qcKqbHC 4q0Q2GKkAAX7PMXcVhSbg49hjV/5Sf1fK2kOcDN0Ag9HRVML9jSn9FovDOhLN1a2gQyqu oNa8LO5wYk+zgXSC4ozTHghp6X3Sydy0ITdnZjFEk7QUswhBTHovIeR0p0Eoj13hpIQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387844; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=norRQyEfHJNwl70v/RHKeDTV7KES9Wjv4vB11PoBhOs=; b=wSdsEBz0zfJKbdqjyKP3G90KD+0djGI7pg6fQsJPpHVZrFg+Eo7IKimRQf94nVNoVmwq 76mVqtVfrt3XJFWP9hfKlx5+JM/1Gdy7tCPIoTbh0uiK6BulOjLOdtJMVTSNY3x6JpbkM +EtiOTgZEJ8VNaNicMb3jKpN1AXecx0rOfbPvTtD/T6ZwvzB3EgDz/V7yvJiVG+ixZ4oa 6wvUMeZfS60YYrCAh8QLFYeW8qHZWg9zDLI/GXXTEqfb+1Fnx0dlJRmxtQNUoiPRGS2DT JErIDxxED99TfyiAikKU2lsL1zRzk0HDZdP2wxH/RuT2j+9fTwtO7dh+3IlBcZtArfA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dzIoqcva; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F044606A322; Fri, 4 Dec 2026 12:37:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dzIoqcva Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB08D1F000CE; Fri, 4 Dec 2026 12:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387844; bh=norRQyEfHJNwl70v/RHKeDTV7KES9Wjv4vB11PoBhOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dzIoqcvaKqn4cgzBs0wZGs5fLbTisVL97dkFk9zdLFbaaS/+b6FhrYZyYaupx6odX FrC0GwHGgk8kvojsPLuHSfhUA09IVujfnQ4TP/rrfhQFbexjPufLKfjFWAIaL8HuU8 cYUGpaknJa6EnHPKHavjo1c57MVJe10M4wOXyK0U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+40b06a86af225236fdb4@syzkaller.appspotmail.com, =?UTF-8?q?Ali=20Ahmet=20Memi=C5=9F?= , Takashi Iwai , Sasha Levin Subject: [PATCH 6.1 0381/1059] ALSA: hda: intel: Dont free card in the probe work Date: Fri, 4 Dec 2026 18:58:32 +0900 Message-ID: <20261204100654.162880677@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ali Ahmet Memiş [ Upstream commit fbaccb1b19c79e79220e3bcc5bb18ca54ffb017b ] If the delayed probe fails, azx_probe_work() frees the card and clears the drvdata. azx_remove() reads the card before it waits for the probe work with cancel_delayed_work_sync() so when the device is removed while the probe work is running, it frees the card again after the work has already freed it. Only disconnect the card in the work so that its slot is released right away and leave freeing it to azx_remove(). Fixes: 39173303c838 ("ALSA: hda: Free card instance properly at probe errors") Reported-by: syzbot+40b06a86af225236fdb4@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=40b06a86af225236fdb4 Signed-off-by: Ali Ahmet Memiş Link: https://patch.msgid.link/20261012162841.1879278-1-aliamemis@disroot.org Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/hda_intel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index f105b320567ea..09cf67a6a93c4 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1743,7 +1743,12 @@ static void azx_check_snoop_available(struct azx *chip) static void azx_probe_work(struct work_struct *work) { struct hda_intel *hda = container_of(work, struct hda_intel, probe_work.work); - azx_probe_continue(&hda->chip, true); + + if (azx_probe_continue(&hda->chip, false) < 0) { + hda->init_failed = 1; + complete_all(&hda->probe_wait); + snd_card_disconnect(hda->chip.card); + } } static int default_bdl_pos_adj(struct azx *chip) -- 2.53.0