The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm()
@ 2026-07-31 10:15 syzbot
  2026-08-06 15:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2026-07-31 10:15 UTC (permalink / raw)
  To: syzkaller-bugs, Aleksandr Nogikh, Chas Williams,
	accessrunner-general, Greg Kroah-Hartman, linux-atm-general,
	linux-usb, netdev, Duncan Sands
  Cc: linux-kernel, syzbot

From: Aleksandr Nogikh <nogikh@google.com>

If cxacru_cm() encounters an error while submitting or waiting for snd_urb,
it aborts and returns the error without killing the already submitted
rcv_urb. This leaves the rcv_urb active.

When this happens during initialization (e.g., in cxacru_atm_start()), the
driver may ignore the error and proceed to call cxacru_poll_status(), which
invokes cxacru_cm() again. Attempting to submit the still-active rcv_urb
triggers a warning in usb_submit_urb():

cxacru 1-1:1.0: send of cm 0x84 failed (-104)
ATM dev 0: cxacru_atm_start: CHIP_ADSL_LINE_START returned -104
------------[ cut here ]------------
URB ffff88812658d200 submitted while active
WARNING: drivers/usb/core/urb.c:379 at usb_submit_urb+0x79/0x18b0
drivers/usb/core/urb.c:379
...
Call Trace:
 <TASK>
 cxacru_cm+0x21a/0xf10 drivers/usb/atm/cxacru.c:631
 cxacru_cm_get_array drivers/usb/atm/cxacru.c:722 [inline]
 cxacru_poll_status+0x178/0x1110 drivers/usb/atm/cxacru.c:828
 cxacru_atm_start+0x185/0x360 drivers/usb/atm/cxacru.c:814
 usbatm_atm_init+0x144/0x3a0 drivers/usb/atm/usbatm.c:927
 usbatm_usb_probe+0x15cb/0x1db0 drivers/usb/atm/usbatm.c:1178
 cxacru_usb_probe+0x17f/0x220 drivers/usb/atm/cxacru.c:1370
...

To fix this, ensure that rcv_urb is properly killed if cxacru_cm() aborts
early. We can safely call usb_kill_urb() on rcv_urb in the error path, as
it is safe to call even if the URB is not active (e.g., if it failed to
submit in the first place, or if it already completed).

Fixes: 1b0e61465234 ("[PATCH] USB ATM: driver for the Conexant AccessRunner chipset cxacru")
Assisted-by: Gemini:gemini-3.5-flash Gemini:gemini-3.1-pro-preview syzbot
Reported-by: syzbot+c9dff578c3a41775176a@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=c9dff578c3a41775176a
Link: https://syzkaller.appspot.com/ai_job?id=75fec6f2-c8a6-43b1-b184-4d26baba86cc
Signed-off-by: Aleksandr Nogikh <nogikh@google.com>

---
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index f1900c567..429ac20a8 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -700,6 +700,8 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
 	ret = offd;
 	usb_dbg(instance->usbatm, "cm %#x\n", cm);
 fail:
+	if (ret < 0)
+		usb_kill_urb(instance->rcv_urb);
 	mutex_unlock(&instance->cm_serialize);
 err:
 	return ret;


base-commit: f5098b6bae761e346ebcd9da7f95622c04733cff
-- 
See https://goo.gle/syzbot-ai-patches for information about AI-generated patches.
You can comment on the patch as usual, syzbot will try to address
the comments and send a new version of the patch if necessary.
syzbot engineers can be reached at syzkaller@googlegroups.com.

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

* Re: [PATCH] usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm()
  2026-07-31 10:15 [PATCH] usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm() syzbot
@ 2026-08-06 15:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-06 15:50 UTC (permalink / raw)
  To: syzbot
  Cc: syzkaller-bugs, nogikh, 3chas3, accessrunner-general, gregkh,
	linux-atm-general, linux-usb, netdev, duncan.sands, linux-kernel,
	syzbot

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 31 Jul 2026 10:15:20 +0000 (UTC) you wrote:
> From: Aleksandr Nogikh <nogikh@google.com>
> 
> If cxacru_cm() encounters an error while submitting or waiting for snd_urb,
> it aborts and returns the error without killing the already submitted
> rcv_urb. This leaves the rcv_urb active.
> 
> When this happens during initialization (e.g., in cxacru_atm_start()), the
> driver may ignore the error and proceed to call cxacru_poll_status(), which
> invokes cxacru_cm() again. Attempting to submit the still-active rcv_urb
> triggers a warning in usb_submit_urb():
> 
> [...]

Here is the summary with links:
  - usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm()
    https://git.kernel.org/netdev/net-next/c/d87cabf0b673

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-08-06 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 10:15 [PATCH] usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm() syzbot
2026-08-06 15:50 ` patchwork-bot+netdevbpf

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