Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3556476pxv; Mon, 28 Jun 2021 07:19:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw546wODld2+TOoDADL134tsds7ei6aO11iK7003Jj5dBVNkz9DTlZLKysFiZhdvxNrge5w X-Received: by 2002:a02:8588:: with SMTP id d8mr22935240jai.118.1624889989360; Mon, 28 Jun 2021 07:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624889989; cv=none; d=google.com; s=arc-20160816; b=PlHrtFfzFaF3yi+DCTSshnCmUtg574xr6htEQXa8e/dJiRpMkeT38a7bwk9i9VgG5s rI3mBSEJwyLRqYN45vSANMPMxotM9LqhYoLvE/hpnF6G8fDoWdDtB04UcHxZHZgCGy6t kAuOu0ScepOhc1Fc44XpkRZYFNsb1J0tYXzTQkAANGs99yB1e7WGbvwdcWMWrNthVDCJ tyHNxdORTKsuppG8ryEruVXm4LBMWav4DUX+HNzzgHt3Dq+Z9angN0YWExA0Y+Ut5l+W ajl7GeTnFqxFokx1ASbQEqyzZia0CX+poJE6ucafkkSvDgZu673LZFeSA5LqYi1I1bCI 2Enw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2hS7UYjU+uFKDJk1V06yBJwkrHesbb867uFAXXZBnHc=; b=JnZEdtEl36e7fyep2LYHR12GdZ8SlaA5VyawTmB9PF1+x+8QAOEZS6ekmq+cfCw9zv ne8/N7+aPlrCXx3v8MThUuNXZVdcFNhRtVxzV+KNOVqXSg61KudQbxlwDWIGweX96XQk prZt3zM0VQ1p6C+KDfZH6XL3AOV3wU+yqwjyDLCUvU0KqXQmpbzE0MZNbCDkSWPPeKc7 iigYlY/qM2ckqA8Ek6YNuVng1qfHClOUOVXpi35oR7KAVY2Axp3ZTVrTIArqczu2hj4V Pwkd+SeJy+763RCoN52lM/ewcCf25uwf+1tu1joDKYBTfx7OcMu8i50M4rbO3EpgW0d6 Qo/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si11669059jav.18.2021.06.28.07.19.36; Mon, 28 Jun 2021 07:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232549AbhF1OUS (ORCPT + 99 others); Mon, 28 Jun 2021 10:20:18 -0400 Received: from netrider.rowland.org ([192.131.102.5]:47827 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S232093AbhF1OUR (ORCPT ); Mon, 28 Jun 2021 10:20:17 -0400 Received: (qmail 657640 invoked by uid 1000); 28 Jun 2021 10:17:51 -0400 Date: Mon, 28 Jun 2021 10:17:51 -0400 From: Alan Stern To: "Zhang, Qiang" Cc: Dmitry Vyukov , syzbot , Greg Kroah-Hartman , "guido.kiener@rohde-schwarz.com" , "dpenkler@gmail.com" , "lee.jones@linaro.org" , USB list , "bp@alien8.de" , "dwmw@amazon.co.uk" , "hpa@zytor.com" , "linux-kernel@vger.kernel.org" , "luto@kernel.org" , "mingo@redhat.com" , "syzkaller-bugs@googlegroups.com" , "tglx@linutronix.de" , "x86@kernel.org" Subject: Re: [syzbot] INFO: rcu detected stall in tx Message-ID: <20210628141751.GB656159@rowland.harvard.edu> References: <000000000000a9b79905c04e25a0@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 06:38:37AM +0000, Zhang, Qiang wrote: > > > ________________________________________ > From: Dmitry Vyukov > Sent: Monday, 19 April 2021 15:27 > To: syzbot; Greg Kroah-Hartman; guido.kiener@rohde-schwarz.com; dpenkler@gmail.com; lee.jones@linaro.org; USB list > Cc: bp@alien8.de; dwmw@amazon.co.uk; hpa@zytor.com; linux-kernel@vger.kernel.org; luto@kernel.org; mingo@redhat.com; syzkaller-bugs@googlegroups.com; tglx@linutronix.de; x86@kernel.org > Subject: Re: [syzbot] INFO: rcu detected stall in tx > > [Please note: This e-mail is from an EXTERNAL e-mail address] > > On Mon, Apr 19, 2021 at 9:19 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit: 50987bec Merge tag 'trace-v5.12-rc7' of git://git.kernel.o.. > > git tree: upstream > > console output: https://syzkaller.appspot.com/x/log.txt?x=1065c5fcd00000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=398c4d0fe6f66e68 > > dashboard link: https://syzkaller.appspot.com/bug?extid=e2eae5639e7203360018 > > > > Unfortunately, I don't have any reproducer for this issue yet. > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > Reported-by: syzbot+e2eae5639e7203360018@syzkaller.appspotmail.com > > > > usbtmc 5-1:0.0: unknown status received: -71 > > usbtmc 3-1:0.0: unknown status received: -71 > > usbtmc 5-1:0.0: unknown status received: -71 > > >The log shows an infinite stream of these before the stall, so I > >assume it's an infinite loop in usbtmc. > >+usbtmc maintainers > > > >[ 370.171634][ C0] usbtmc 6-1:0.0: unknown status received: >-71 > >[ 370.177799][ C1] usbtmc 3-1:0.0: unknown status received: >-71 > This seems like a long time in the following cycle, when the callback function usbtmc_interrupt() find unknown status error, it will submit urb again. the urb may be insert urbp_list. > due to the dummy_timer() be called in bh-disable. > This will result in the RCU reading critical area not exiting for a long time (note: bh_disable/enable, preempt_disable/enable is regarded as the RCU critical reading area ), and prevent rcu_preempt kthread be schedule and running. > Whether to return directly when we find the urb status is unknown error? Yes. > diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c > index 74d5a9c5238a..39d44339c03f 100644 > --- a/drivers/usb/class/usbtmc.c > +++ b/drivers/usb/class/usbtmc.c > @@ -2335,6 +2335,7 @@ static void usbtmc_interrupt(struct urb *urb) > return; > default: > dev_err(dev, "unknown status received: %d\n", status); > + return; > } > exit: > rv = usb_submit_urb(urb, GFP_ATOMIC); This is the right thing to do. In fact, you should also change the code above this. There's no real need for special handling of the -ECONNRESET, -ENOENT, ..., -EPIPE codes, since the driver will do the same thing no matter what the code is. Alan Stern