Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE6A046D09E; Tue, 21 Jul 2026 17:36:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784655363; cv=none; b=qaHTr0jG3fm5XDW8ws+5Uz6sDcnpXYTBMQFz4MflZp+yQVzlee2UQh+E2YYgDbyoFjNdUOD66Tg21ADrU2Ax914kJb5FS+l9w8ubhXqUgGQMhhkLxgYARHk5T4gxAa/zVg2qoZv4/XznUpYO1lFeQXaBIeEnQRxvKzj++BRgHjU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784655363; c=relaxed/simple; bh=mjPQYdfiP4QdUdnCPy/Si0SONZte3Nzj1Eiawb6wyrY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HzygR80PhPsFTxvHqkXR/TLHY57XUhRbXSF4PP9oFY2F+TbUONjX8RgjrLnOkL8CU+M2q8AOeUtYRTJVWxK6JynlrLF3sVGuW5DbT/e9gF3HJQZRseGT6pu+v9FH74NrZcvC3D3wvKEiQ6rpgd3CMLsXdE3ZAQg3grvtyRs4uk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LX97jegE; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LX97jegE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88E441F000E9; Tue, 21 Jul 2026 17:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784655361; bh=ZY/cqKibs/oRd5+rSldJpDr317udcNZkUXzHNVWeXC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LX97jegEl/4O/AyrxnXfym5xjH1j5pTW8IggUObY0FdESe/DJPzmVpMbeVbk4lm4m 59B/qHMbAnaGYpZZ7NPGEloZUS6nGqFeAVzfItP9yWhFUauYhjEJDCdHLJwjy9Zero jmaXu0pzqhtojzqZTH6u6YrckHMr38WpWZARIk90= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?C=C3=A1ssio=20Gabriel?= , Takashi Iwai , Danilo Krummrich , Sasha Levin Subject: [PATCH 7.1 2055/2077] ALSA: hda/tas2781: Cancel async firmware request at unbind Date: Tue, 21 Jul 2026 17:28:48 +0200 Message-ID: <20260721152641.171700909@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cássio Gabriel [ Upstream commit 5367e2ad14f0ae9350a7aaf2e77c87de39a43ae9 ] TAS2781 HDA I2C and SPI queue RCA firmware loading from component bind with request_firmware_nowait(). The firmware loader keeps the callback module pinned and holds a device reference, but the callback still uses driver-private HDA state. Component unbind removes controls and DSP state immediately. Later device removal tears down the TAS2781 private data, including codec_lock. If the async firmware callback runs after unbind has started, it can operate on state that is being torn down. Cancel or synchronize the async firmware request before removing controls and DSP state. A queued callback is cancelled, and an already-running callback is allowed to finish before unbind continues. Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel Reviewed-by: Takashi Iwai Acked-by: Danilo Krummrich Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260505-alsa-hda-tas2781-fw-callback-teardown-v4-2-e7c4bf930dc8@gmail.com Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 3 +++ sound/hda/codecs/side-codecs/tas2781_hda_spi.c | 3 +++ 2 files changed, 6 insertions(+) --- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c @@ -588,6 +588,9 @@ static void tas2781_hda_unbind(struct de comp->playback_hook = NULL; } + request_firmware_nowait_cancel(tas_hda->priv->dev, tas_hda->priv, + tasdev_fw_ready); + tas2781_hda_remove_controls(tas_hda); tasdevice_config_info_remove(tas_hda->priv); --- a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c @@ -750,6 +750,9 @@ static void tas2781_hda_unbind(struct de comp->playback_hook = NULL; } + request_firmware_nowait_cancel(tas_priv->dev, tas_priv, + tasdev_fw_ready); + tas2781_hda_remove_controls(tas_hda); tasdevice_config_info_remove(tas_priv);