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=1796385064; b=TtOpK6YhwsHee23xh6axmjGM7arluSAHlp5ucDzF6wTDVZxL9gtNvlUD3t4RBPqhNoGQ FxcrjQ3ouWUIYWzNrRIhVkqYVY1BQjQY5FIr9jCQEg0HKuVWlRyn/qWi7vleItSOz15vE 2b4XBmelUIkhtYEPCGQ3gIIXUVfeuPjE2cvxUCZ3a82Ch0sBfetNj1gQ70t7/fgIj2uN/ q76RoqZkVSnZhwNbnFRVKZfRydc25CHxbYmLUFZg9QIvHiIgKR7WC1sO21L3+HWhwLQ/6 f/DXjzceRkDWtTpOsWvRHYPROtp0Ltr+51mEPSyA1NkxHKoYJT6P53N2tvVsq5PT1Pw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385064; 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=U0FtXUGgp7mCi2FJMYY9pmJLQMknZTf0M+yVtSeLHiM=; b=JH+HppqImj/sonkmZNnl1nOpKpGyIV0XMRsiU6c5KH3EzXMmX2j+NUXM2OFnIsdRcYc/ lDD4Ny1ZkHPpOyss5Q78n/0oAoKB+X21LzPYnu3mVXsgJ0fd2xHzlkCAnmHJiup4b0Bfp YbtryGYzlnXoFmBMPNPyD3jGbVEgcUiYMKqMnoi6qYaNdATshISFkWj4ODmo/8g3f0lOI 5aZInxx1x6q7bRx7kt5NQ7XsKC9C7pp2tuFErHkrkH5rb5j2GOGvNGoXgoy/l9795BIWm UxWeEFnxkCmFZ0Ypz10UJSAZkkyJLZ6MRL9VpD0WFRWobDGGSEvpTnTcDV7P+tYqmqw== 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=1RBTa0NK; 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 B237B606A322; Fri, 4 Dec 2026 11:51:04 +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=1RBTa0NK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26C911F000CE; Fri, 4 Dec 2026 11:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385064; bh=U0FtXUGgp7mCi2FJMYY9pmJLQMknZTf0M+yVtSeLHiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1RBTa0NKbhdBIJnJTf0KckcelniGeaC/LyqSwdK5Be60dQ/XG2AguX9EDahw+rmu8 Uj2BPnxL0/Ts8w5DFKWQUJwH+bwXOfBVrJLNl44nXt8TpvkDavMMfQavxXmScmt89N RnXgrZeU0m6XEXASHA6PX0tJJEM3HxJ0YX8v5Vco= 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.6 0403/1167] ALSA: hda: intel: Dont free card in the probe work Date: Fri, 4 Dec 2026 18:57:10 +0900 Message-ID: <20261204100712.524184179@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@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.6-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 6cf99154e528c..7d23b66baef32 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1740,7 +1740,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