Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3764816pxt; Tue, 10 Aug 2021 10:47:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIv0LkQ78+QNJAzYBUqafwx1jPU6PUpkACvr5PIA2jPvUNDUs80+UIQ7qmfthxH7HF5svK X-Received: by 2002:a05:6402:31ae:: with SMTP id dj14mr6320234edb.94.1628617633962; Tue, 10 Aug 2021 10:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617633; cv=none; d=google.com; s=arc-20160816; b=1FsVDLvh3jkUjhYfWitQs4Xd48qYQ+8YDA3xDV4njgeR4XR9344GU7XtFsZtFVl4RI vFe6Yu9WrUgs6/F4KskXrwvDiEsNvbPYduEZsVncNsQUptO8B/9m0vihrXdVDSQsnA2Z XiTRqHwRD7oucnpvMq7mWDdkhPw6dOD5WIwKk1ACbF2YMqYUSGZSu9gWtAWBCn88Hmr3 V1XxbVzE8re6/085t3Z8vUX5YeEaEJRsKaj5LDv6NST3UBbKRc6xvrD0cRJnpREe164n xV0v4uOrQulPU+ba7B+ccEROE0XDL4QH+bbjzyF+2gsqG2B3bBr9lVCtxvd1IkHKm8/j 11vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=19wfW/5bj6HFPQNJ9BtM383zLk8Nvs/hu7ijZAm/9RE=; b=znRw2p3OpHXJeSG5S5WuX4Jt3+7fZyIjEd/A9ZD8koTEL3+07Hc64rY+/0ZEByKNtv eKi++SasLrNZfUFcLtfA1I5CEuWZDwe8m1qNRmjMMCH9H/h+HvCfXv4I2D5+nCwnOuii Ss8lsu1r/b766urWcgwuF+5nUwpgivl/Nkto05caAxTYMq3A0q0SbL5Ckd3Ui/2iKnfK O76cFOGCwivlfcSKUzmdddWsOUIcDlARN9QnuO4E7i0H6d2sSBzysQQMbuHT6OPJRLyj xwjSSqyZu1BtBMLEUrlYrqsSwFBsv+HH/SlLIegrI+iI0jJN8PVZVqjsoe3f0LR54Sbq 7CZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2P6JyKJd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si8023763edy.388.2021.08.10.10.46.48; Tue, 10 Aug 2021 10:47:13 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2P6JyKJd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234828AbhHJRpu (ORCPT + 99 others); Tue, 10 Aug 2021 13:45:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:41668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235072AbhHJRlv (ORCPT ); Tue, 10 Aug 2021 13:41:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C22860295; Tue, 10 Aug 2021 17:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617115; bh=dBCMdyDo4CrkKhZDC0vQjDKfJr/RMbR8kWuAUrlsY9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2P6JyKJdUjEsVpS4YtqcWL0MIbUlH2FJuLUmSZ15gYlmSYCe9S0YtzHrlz3oWLd9l ecDiJf1p1jVOGGE3WanOz3CH3gPI00u76nprJggeXqbjyRyEghag3gbq79niDZCn1V dD+0SOb6Q+hlKpOnfVT0Ornz6QBjgRsVbZWAzwv4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+e2eae5639e7203360018@syzkaller.appspotmail.com, "Qiang.zhang" , Guido Kiener Subject: [PATCH 5.10 052/135] USB: usbtmc: Fix RCU stall warning Date: Tue, 10 Aug 2021 19:29:46 +0200 Message-Id: <20210810172957.465986013@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qiang.zhang commit 30fad76ce4e98263edfa8f885c81d5426c1bf169 upstream. rcu: INFO: rcu_preempt self-detected stall on CPU rcu: 1-...!: (2 ticks this GP) idle=d92/1/0x4000000000000000 softirq=25390/25392 fqs=3 (t=12164 jiffies g=31645 q=43226) rcu: rcu_preempt kthread starved for 12162 jiffies! g31645 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0 rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_preempt state:R running task ........... usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: usb_submit_urb failed: -19 The function usbtmc_interrupt() resubmits urbs when the error status of an urb is -EPROTO. In systems using the dummy_hcd usb controller this can result in endless interrupt loops when the usbtmc device is disconnected from the host system. Since host controller drivers already try to recover from transmission errors, there is no need to resubmit the urb or try other solutions to repair the error situation. In case of errors the INT pipe just stops to wait for further packets. Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation") Cc: stable@vger.kernel.org Reported-by: syzbot+e2eae5639e7203360018@syzkaller.appspotmail.com Signed-off-by: Qiang.zhang Acked-by: Guido Kiener Link: https://lore.kernel.org/r/20210723004334.458930-1-qiang.zhang@windriver.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/usbtmc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -2283,17 +2283,10 @@ static void usbtmc_interrupt(struct urb dev_err(dev, "overflow with length %d, actual length is %d\n", data->iin_wMaxPacketSize, urb->actual_length); fallthrough; - case -ECONNRESET: - case -ENOENT: - case -ESHUTDOWN: - case -EILSEQ: - case -ETIME: - case -EPIPE: + default: /* urb terminated, clean up */ dev_dbg(dev, "urb terminated, status: %d\n", status); return; - default: - dev_err(dev, "unknown status received: %d\n", status); } exit: rv = usb_submit_urb(urb, GFP_ATOMIC);