The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ALSA: usx2y: Stop clearing urb->hcpriv before submission
@ 2026-08-10  5:57 Michal Pecio
  2026-08-10 11:39 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Pecio @ 2026-08-10  5:57 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: linux-sound, linux-kernel

This is managed by USB core and drivers aren't expected to touch it.

It should only be not NULL on a submitted URB, in which case clearing
defeats the "submitted while active" sanity check in usb_submit_urb()
and may crash the HCD handling the URB and panic the kernel.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
---
 sound/usb/usx2y/usbusx2yaudio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
index 3808df54727d..a3a0bc13632b 100644
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -167,7 +167,6 @@ static int usx2y_urb_submit(struct snd_usx2y_substream *subs, struct urb *urb, i
 	if (!urb)
 		return -ENODEV;
 	urb->start_frame = frame + NRURBS * nr_of_packs();  // let hcd do rollover sanity checks
-	urb->hcpriv = NULL;
 	urb->dev = subs->usx2y->dev; /* we need to set this at each time */
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err < 0) {
-- 
2.48.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: usx2y: Stop clearing urb->hcpriv before submission
  2026-08-10  5:57 [PATCH] ALSA: usx2y: Stop clearing urb->hcpriv before submission Michal Pecio
@ 2026-08-10 11:39 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-08-10 11:39 UTC (permalink / raw)
  To: Michal Pecio; +Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel

On Mon, 10 Aug 2026 07:57:28 +0200,
Michal Pecio wrote:
> 
> This is managed by USB core and drivers aren't expected to touch it.
> 
> It should only be not NULL on a submitted URB, in which case clearing
> defeats the "submitted while active" sanity check in usb_submit_urb()
> and may crash the HCD handling the URB and panic the kernel.
> 
> Signed-off-by: Michal Pecio <michal.pecio@gmail.com>

Applied to for-next branch.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-10 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10  5:57 [PATCH] ALSA: usx2y: Stop clearing urb->hcpriv before submission Michal Pecio
2026-08-10 11:39 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox