From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f46.google.com (mail-dl1-f46.google.com [74.125.82.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7632E369208 for ; Tue, 23 Jun 2026 01:16:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782177385; cv=none; b=bjjadv6+SVuAFjK1u9AVquT1GMz6PGkLsDVOT5SgNSw62ygZHEOazhlWg2Q/Au/hPiIB+VXJZ5JRxxKkPimYnkboVSKb3FgPwKCy5JKQJCoB6P8HjwWd2HIFNNtpBNJVaaeevDCmmaNUHbTXQd6EZqHO3Gr/KMhrkC0SGdqsL1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782177385; c=relaxed/simple; bh=lgWpE2gY+g/2MbX+tAt1Noq8uPOKkbtQSpA48syYG+M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dT7gEH2L/3JS81E6730qDFvGGzqQtkOSI8kX0tmCFwPCH2PBJCoVTdUrqxSRf7JN909QB/dMRy+dZN0rsa6m/AsiknAEJ0pv4ovBfuuapHVkz3H4GvpUBJ5Q90B7Uzh4Fz6D9A4Fsu2x708hAjGVlxs91SiZ4gAorI93gDeIti4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BxDuxYwp; arc=none smtp.client-ip=74.125.82.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BxDuxYwp" Received: by mail-dl1-f46.google.com with SMTP id a92af1059eb24-137eb0d76beso465155c88.0 for ; Mon, 22 Jun 2026 18:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782177383; x=1782782183; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=33paqDjGP10yh/AMCFQnglsldxp5YtWteEECzRsr7y0=; b=BxDuxYwp1NqqVKsJ+/o0SwbCM1lOFvoelg7uEYdG4/NyBdhFSq1SkeCBFjqLdisNqD By4Ycg5tWe+Ln99wokg7yrqwHks0bfrzntBxnjXoWnmVAUcKPncjW5K83XkSAWK0Glxr Tk5lgtvDbbFCYRntZYgBGDbr53b54kzB0KgUku05Qlc3a4r8nA8OUxmxGbcq9/iHmLg8 RkPdXZDNLNCusRdB3cTW/WCC9YD4hyn8dmBE7BDPSWeZ4nqBo85c3lQPcIELw9XT3S+c cYuJAnPmuqY6SQhTd5BXQDA0olYYpcUwSLY/58j/HdhbHG2r9ymipLcKO2bWYIu7V5WK XALA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782177383; x=1782782183; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=33paqDjGP10yh/AMCFQnglsldxp5YtWteEECzRsr7y0=; b=j1prS1jXXRKg8rw5z3bg/3vKhMMlMptA/4aXFoKMibOxUa4dbyFggrZx9nRW45Dghd NYxYKOQR9VaOodnmGXsHTioqtkRvW5YhVaKQHOqhnz/K3LmGd78OfRTdSFS0BDgo9ZR2 Uw7mjfEMYczT80Zf0AJkrJm0abuOy0oUpX2Ez4aqmwzykrx+ApRxIDjfeifFNYG8JWdn 3VAAYZ/OkSJIF99wHTWmXxxf81eyAVgQcDvYoo8bgDd3cppU+QuYnmwBNVpzjAV3XGxF ZQZOO+Nt2AJaWP0I+PyKSOj4KFFp+0QGCnG/U5CDLTsbVLCDBARdddxdHOrX3+R1Fpyp lE/w== X-Forwarded-Encrypted: i=1; AHgh+RpIlJkC/V+fmBjrA4dTEdq9UPLV+TqmNagWsu6ajtdVQCX3n6wMMPqHHmpCZArwjVImLZF2QOM6o5pYnBw=@vger.kernel.org X-Gm-Message-State: AOJu0Yz5gA7OIPTAV0dn3EfxaTNsKjpG0Tkyg2sQuzTdsuyk3eZvAVgF 7SB42wiBXQw6ULvO5lSZSMTZUIbYLR9To+j2sf2hqUsxZ7YZcen1VXva X-Gm-Gg: AfdE7clOAYf8Gb8f7jKXsMjrYE8/GLsalZdWb8xwtXjdNzpIXJfWxdSNWg4S6W6ndPr 9XUDU5h3fs1xZDuvb6zBTHuypagxKIV9tcNHL/LDh8m2MnQW6ZK+tuyZgoOir7k9wiXHlMaWqeM 5SOqLzwzrlujjZU5BYdVm8LnQLVOlEqCTWXzhd6/1Q8vYk0iXWf5C/dD8fUuUx0d+MSrWlvxBPl v+g6ybmSelYy7P03WIle3QCLaiQGjc7POuTBcP85Zq56ciRzV+6+JtkWqXeQhyDV60Rn6QESzpw 0+VjurOJxFdL6lyWpGqmsi8If2pVpujjusrfhymvu6DD4RMmK5KtU0aXdGCVnvltk8CYdONLr8D rGGL054F1EdHncDoQeLF9w+b82Uwp+Waknkvdb9jgYX/HzgGZcqfCEJfaSygBTN5lXXeM3hEDq1 WNjAsuz6GdXHtjaW6I5VGlz3CdSahhqGn9fV0SnRTMYbYOegXf3Y4IDA== X-Received: by 2002:a05:7300:642a:b0:2c9:ee15:a0ee with SMTP id 5a478bee46e88-30c555b8663mr1397387eec.12.1782177383418; Mon, 22 Jun 2026 18:16:23 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:7d8d:3bdf:d563:1911]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30c1bdffa83sm15845220eec.23.2026.06.22.18.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2026 18:16:22 -0700 (PDT) Date: Mon, 22 Jun 2026 18:16:19 -0700 From: Dmitry Torokhov To: "Wang, Jie" Cc: Henk Vergonet , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "syzbot+039eab266c6321a174bd@syzkaller.appspotmail.com" , "syzkaller-bugs@googlegroups.com" Subject: Re: [PATCH] Input: yealink - stop URB resubmission on completion error Message-ID: References: <68bba4fb.050a0220.192772.01a4.GAE@google.com> <20260616110440.1073059-1-jie.wang@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jun 17, 2026 at 05:49:07AM +0000, Wang, Jie wrote: > Hi Dmitry, > > Thank you for the review. > > > -----Original Message----- > > From: Dmitry Torokhov > > Sent: Wednesday, June 17, 2026 3:17 AM > > To: Wang, Jie > > Cc: Henk Vergonet ; linux-input@vger.kernel.org; > > linux-kernel@vger.kernel.org; > > syzbot+039eab266c6321a174bd@syzkaller.appspotmail.com; syzkaller- > > bugs@googlegroups.com > > Subject: Re: [PATCH] Input: yealink - stop URB resubmission on completion error > > > > Hi Jie, > > > > On Tue, Jun 16, 2026 at 11:04:40AM +0000, Jie Wang wrote: > > > 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 > > > > It would be good to have a helper like > > > > bool usb_is_permanent_error(struct urb *urb, struct device *dev); > > > > instead of having this "switch" in all the drivers. It also unclear whether we should > > not attempt to re-submit the URB on errors other than ECONNRESET, ENOENT, or > > ESHUTDOWN. > > > > For the helper - how about a local yealink_urb_check_status() in v2? > A usb_is_permanent_error() in usb.h would benefit more drivers > across the tree, but that's a larger effort best done separately. I do not think we are in a rush to fix this: the driver is old and I have no idea how many users actually have the device. > > For resubmission - I'm thinking stop immediately on -ECONNRESET, > -ENOENT, -ESHUTDOWN, and for > everything else retry up to 50 consecutive errors before giving up. > Counter resets on any successful completion, so transient bus glitches > recover but a dead device won't spin thThat is probably reasonable.e CPU forever. That is sounds reasonable. Thanks. -- Dmitry