From: Takashi Iwai <tiwai@suse.de>
To: YuanZhe Liu <25031212351@stu.xidian.edu.cn>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
Bin Yu <byu@xidian.edu.cn>, Cheng Wen <wencheng@xidian.edu.cn>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v4] ALSA: usx2y: Refuse a retried DSP load after a failure
Date: Sun, 01 Nov 2026 16:33:37 +0100 [thread overview]
Message-ID: <87jymwpnvy.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261031191557.8460-1-25031212351@stu.xidian.edu.cn>
On Sat, 31 Oct 2026 20:15:57 +0100,
YuanZhe Liu wrote:
>
> snd_usx2y_hwdep_dsp_load() sets up the asynchronous sequence URBs and
> the interrupt URB when the FPGA firmware image with index 1 is loaded,
> and then creates the ALSA devices. If usx2y_in04_init() or
> usx2y_create_alsa_devices() fails, the URBs that were already set up
> are left in place.
>
> The core keeps the index unloaded when the callback fails, so user
> space may issue the same request again. The second attempt then enters
> usx2y_async_seq04_init() or usx2y_in04_init() with the URBs still
> allocated and trips WARN_ON(usx2y->as04.buffer) or
> WARN_ON(usx2y->in04_urb).
>
> The URBs cannot be released at this point: the card may already have
> registered PCM devices that user space can still open, and the
> disconnect handler accesses the URBs without holding the DSP lock.
> Mark the chip as hung instead, so that a retried request is refused
> with -ENODEV and the assertions keep their meaning. The URBs are
> released by snd_usx2y_card_private_free() when the card is freed.
>
> A failing usx2y_async_seq04_init() still releases its own URBs, so that
> path remains retryable.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Co-developed-by: Bin Yu <byu@xidian.edu.cn>
> Signed-off-by: Bin Yu <byu@xidian.edu.cn>
> Co-developed-by: Cheng Wen <wencheng@xidian.edu.cn>
> Signed-off-by: Cheng Wen <wencheng@xidian.edu.cn>
> Signed-off-by: YuanZhe Liu <25031212351@stu.xidian.edu.cn>
Applied now. Thanks.
Takashi
next prev parent reply other threads:[~2026-11-01 15:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 8:48 [PATCH 0/2] ALSA: fix a user-triggerable WARN on repeated DSP load YuanZhe Liu
2026-10-29 8:48 ` [PATCH 1/2] ALSA: hwdep: Serialize DSP load requests YuanZhe Liu
2026-10-31 16:00 ` Takashi Iwai
2026-10-29 8:48 ` [PATCH 2/2] ALSA: usx2y: Avoid WARN on a repeated DSP load YuanZhe Liu
2026-10-31 16:00 ` Takashi Iwai
2026-10-31 17:16 ` [PATCH v2] ALSA: usx2y: Release the URBs when the DSP load fails YuanZhe Liu
2026-10-31 17:27 ` sashiko-bot
2026-10-31 18:56 ` [PATCH v3] " YuanZhe Liu
2026-10-31 19:07 ` sashiko-bot
2026-10-31 19:15 ` [PATCH v4] ALSA: usx2y: Refuse a retried DSP load after a failure YuanZhe Liu
2026-11-01 15:33 ` Takashi Iwai [this message]
2026-10-30 17:36 ` [PATCH 0/2] ALSA: fix a user-triggerable WARN on repeated DSP load YuanZhe Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jymwpnvy.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=25031212351@stu.xidian.edu.cn \
--cc=byu@xidian.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=wencheng@xidian.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox