Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4576323ybe; Mon, 16 Sep 2019 14:47:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzc6kkSE+7rC3IEpYvfgByinjjAjO7bKejv3UzCHI4ktCNKVxc/3rKRBj2SrRH1bwt138j1 X-Received: by 2002:a17:906:fae2:: with SMTP id lu34mr1937983ejb.53.1568670426728; Mon, 16 Sep 2019 14:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568670426; cv=none; d=google.com; s=arc-20160816; b=EchpdqXlMzvdyoNEIMEptUxIPPgCV4B0/Wv1xtERBbZroHl5YdY/FAco9LoAXGx/iw YgEKZc4bc60G9w1igeJ8oaVnZJ9ztzSTswLuG4ey4C6sTHgeIYHViGZXFNdR+oGE/O3q WkjlT++Vh0V9bGEQ304mq7V/7aTWftErPwnVnk30EIQl1bE2eTsMIXn845uUNLIVzuLN pEgIQBouc9uoUDNX/vbxxisbi0nHCSxw2yyc++lc0TUDlF26VrkcRdcUvZHNk5H2ZpWc k8eaXNSr2HCz2aclTpAcNY+nYhYTykcZeDxakLiFnIoWwWJmyun6NQZJM6lXuLBzMDzk nigg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=g8r6PapFB/nMnzKEYX/u+v719MKFUtCw17I6bSSzK+E=; b=KIbs9JQRGFOkS10U+lXOwTtOepxuMGeu7AcvqniWYVfWAgxKnZVCHcIJenVr60bYRZ oMDQZPTXW0bfzqV6Vr8ooGcSV1dEfkrIF3dB4C5xZv7CkdkjXCi8ugdVsBP25dVDXA4X VRclxKglArF+0z1eUw+GsvEEg6AaMb37Hy0aVAn23QF+VvyCxVd2n1D7Za/baQmlI6QF bi/0vKkJ61CoxWnsm6OA6ThS9ff4SWaCIViPlgtWKdRyG/1a5WjWdsYSt56CubFGI273 9n9zTSOhy7+Ox6bs0WHS/mTdkNdpovowwCI55/b7XSagSm6Lj4YBk6e8HzBv7IPZP4rS cmCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6si86263eji.137.2019.09.16.14.46.42; Mon, 16 Sep 2019 14:47:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388589AbfIPTsY (ORCPT + 99 others); Mon, 16 Sep 2019 15:48:24 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:51922 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727920AbfIPTsY (ORCPT ); Mon, 16 Sep 2019 15:48:24 -0400 Received: (qmail 6952 invoked by uid 2102); 16 Sep 2019 15:48:23 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 16 Sep 2019 15:48:23 -0400 Date: Mon, 16 Sep 2019 15:48:23 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Greg Kroah-Hartman cc: Andrey Konovalov , syzbot , Felipe Balbi , , LKML , USB list , syzkaller-bugs , Dmitry Vyukov Subject: Re: INFO: rcu detected stall in dummy_timer In-Reply-To: <20190916185933.GA1814003@kroah.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Sep 2019, Greg Kroah-Hartman wrote: > On Mon, Sep 16, 2019 at 12:32:52PM -0400, Alan Stern wrote: > > Retry-limiting is not the sort of thing we want to add to each > > individual USB class driver. Maybe it can be handled in the USB core; > > I'll try to write some code for it. Under normal circumstances the > > issue just doesn't arise, because normal devices aren't malicious. > > I think this issue came up years ago when people realized they could > "abuse" this through usbfs, but maybe I am mistaken. > > The "do we retry or not" is an old discussion, and one I think we just > said, "if it errors out, we will not retry as something is wrong with > the device". Really? I bet there are plenty of drivers whose interrupt-URB (or whatever) completion handlers just log an error message and blindly resubmit when they get an unexpected kind of error. > Corrupted packets don't seem to be something that is even > noticable in the "real world". When lots of noise happens on a system > that might cause this, usually the hub just disconnects the device and > resets it. I recall hearing from someone (many years ago -- the technology has certainly improved since then) about a device that would start getting errors whenever a noisy fluorescent light near the computer was switched on. :-) But yes, this sort of thing is very uncommon. So do you recommend editing drivers to prevent them from resubmitting URBs whenever they get an unrecognized error, such as -EPROTO, -EILSEQ, or -ETIME? Then the driver would most likely stop working when one of these errors happens. Alternatively, the USB core could keep track of these three kinds of bus errors for all endpoints and fail submissions when the error count gets too high. That would end up having the same effect -- drivers would stop working -- but it might be a little more robust against noise and it wouldn't require editing lots of drivers. Alan Stern