From: Jie Wang <jie.wang@intel.com>
To: Henk Vergonet <Henk.Vergonet@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+039eab266c6321a174bd@syzkaller.appspotmail.com,
syzkaller-bugs@googlegroups.com
Subject: [PATCH] Input: yealink - stop URB resubmission on completion error
Date: Tue, 16 Jun 2026 11:04:40 +0000 [thread overview]
Message-ID: <20260616110440.1073059-1-jie.wang@intel.com> (raw)
In-Reply-To: <68bba4fb.050a0220.192772.01a4.GAE@google.com>
urb_irq_callback() and urb_ctl_callback() resubmit each other's URBs
regardless of completion status. When the device returns a persistent
error (-EPROTO), this creates an unthrottled resubmission loop that
starves the CPU and triggers RCU stalls.
Stop resubmitting on any non-zero URB status, following the standard
completion pattern used by other USB input drivers.
Reported-by: syzbot+039eab266c6321a174bd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=039eab266c6321a174bd
Signed-off-by: Jie Wang <jie.wang@intel.com>
---
drivers/input/misc/yealink.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index 8786ed8b3565..bbfa1a9c23d1 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -414,9 +414,20 @@ static void urb_irq_callback(struct urb *urb)
struct yealink_dev *yld = urb->context;
int ret, status = urb->status;
- if (status)
+ switch (status) {
+ case 0:
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ dev_dbg(&yld->intf->dev, "%s - urb shutting down with status %d\n",
+ __func__, status);
+ return;
+ default:
dev_err(&yld->intf->dev, "%s - urb status %d\n",
__func__, status);
+ return;
+ }
switch (yld->irq_data->cmd) {
case CMD_KEYPRESS:
@@ -452,9 +463,20 @@ static void urb_ctl_callback(struct urb *urb)
struct yealink_dev *yld = urb->context;
int ret = 0, status = urb->status;
- if (status)
+ switch (status) {
+ case 0:
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ dev_dbg(&yld->intf->dev, "%s - urb shutting down with status %d\n",
+ __func__, status);
+ return;
+ default:
dev_err(&yld->intf->dev, "%s - urb status %d\n",
__func__, status);
+ return;
+ }
switch (yld->ctl_data->cmd) {
case CMD_KEYPRESS:
--
2.34.1
next parent reply other threads:[~2026-06-16 3:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <68bba4fb.050a0220.192772.01a4.GAE@google.com>
2026-06-16 11:04 ` Jie Wang [this message]
2026-06-16 3:31 ` [PATCH] Input: yealink - stop URB resubmission on completion error sashiko-bot
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=20260616110440.1073059-1-jie.wang@intel.com \
--to=jie.wang@intel.com \
--cc=Henk.Vergonet@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+039eab266c6321a174bd@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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