Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3761175pxt; Tue, 10 Aug 2021 10:42:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI0M6PfJeulMgIxPqKvtDGjvGiMcBSQamql66cYMpzgCYIHfmT32MWxUd/dmIYfz+3uxfd X-Received: by 2002:aa7:c9d8:: with SMTP id i24mr6338554edt.79.1628617325665; Tue, 10 Aug 2021 10:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617325; cv=none; d=google.com; s=arc-20160816; b=qMLNK3E3fM2eCVgb91coXHwRrJuVRFkAu8MaHAYC+iRkWn1dpLNwW2uNevuv2T2tam s3pR7ftTuPn4Qqvv7xtBw6Bd62bWryqp48Xwh5FEMtkLkbTPamkAXqkig6qMT3GoqcMl ptmCkVy5QlFtEvm1rcjwC1yyunwXY1rwFAQG6GwaYHJzAQHj4LD4PSEJIpCEtr+HWr0s Ccc9f9miNILwX+bw9K2YkeY6gnHgYby/uuQ0JY7gNG6hIQcgPQ2NDdGhERe99DL4Kjl+ dkzxpSeUmEo5KO7EcC9njD74e9KVgKxxE7n52socYEeXzaPc55BtsC0jApEsrhqgcpWd UJLw== 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=ix8VOaBD08VNvV8YoLtPsoSo6Frnzz2/CnRA5x8Ywg4=; b=NE2fF5njyPNbWUd8O1CcYpJrXiMEhB0Iu7qY03HtdbXehuU/djlj+TAo3ys3acpAOB djz+FfHzD1rV0N1mA8uvBtefAOi6zKAYGqULVlgh1q4L2Dy232K9o4utxR3wRjxVBFBf 3WOCjdsfO3/a7/kfmEkpbNknk9PxGWWJSPLIjKJcIjxzCSXcyAOls+BG/UsfC53dXjNk BxITrT54z8FGdNhh6cCgBRa0Lhn20GhVsgGP9E1k4dEV+SBigJOkTgtk6qyHnkETcZC6 6CTvEaQPauuWz/R50ZUYBNU9GD8XrESu9WbCrtbI5FuI8zzOCksCGkwA2FPfE8Ede6+2 81Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HLI4xTQR; 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 f23si832704eds.64.2021.08.10.10.41.41; Tue, 10 Aug 2021 10:42:05 -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=HLI4xTQR; 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 S233477AbhHJRgo (ORCPT + 99 others); Tue, 10 Aug 2021 13:36:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:43594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbhHJRfK (ORCPT ); Tue, 10 Aug 2021 13:35:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD64F61058; Tue, 10 Aug 2021 17:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616888; bh=kinxwyy1lSZvwwV5c6jMnGAkZYk2Yw5ZfMAVTmc32w0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HLI4xTQRlSl2XcD47VZLKn4ZY1UKnP3MY/XL6tMfOEgcK3bNgB72o5GY4CBXhywJC cPun74BDEXQ/ug3eaXQ4oYSzHRreRLM9EaYGsaYO1TLEabD6qGsbxZwWWC5vDlxQjy l/90BqYAT88QCPinBfeIwxJ3zcYpdMiANYxnda3k= 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.4 36/85] USB: usbtmc: Fix RCU stall warning Date: Tue, 10 Aug 2021 19:30:09 +0200 Message-Id: <20210810172949.427395262@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172948.192298392@linuxfoundation.org> References: <20210810172948.192298392@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 @@ -2285,17 +2285,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); /* fall through */ - 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);