Skip to contentSkip to conversation

ALSA: usx2y: Stop clearing urb->hcpriv before submission

PATCH Applied Michal Pecio 2 participants 2 messages Aug 10 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usx2y: Stop clearing urb->hcpriv before submission

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.

---
 sound/usb/usx2y/usbusx2yaudio.c | 1 -
 1 file changed, 1 deletion(-)
sound/usb/usx2y/usbusx2yaudio.c +0 -1
index 3808df54727d..a3a0bc13632b 100644
@@ -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) {
Signature · 1 line
2.48.1
Applied
#1 lore raw
Quoted 8 lines · Michal Pecio

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.

Applied to for-next branch. Thanks.

Takashi