Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2325793pxb; Sat, 28 Aug 2021 11:06:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVp598J6n3dzJ2tndBoTsWHU3qyRjXOGaSL15N+z+Qp0hPvon+fAaYP0C9bsT5dTR30Dru X-Received: by 2002:a5d:8a05:: with SMTP id w5mr12127133iod.155.1630173977448; Sat, 28 Aug 2021 11:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630173977; cv=none; d=google.com; s=arc-20160816; b=IIk573s7EWmukRlfUrcHcBNeO3IUcWArrjCDtFxAMDFp3SqWRYFS2DDsZCT30lR5hY 29cponcS/1XkjUdj/p/OYjxcEhEb+K9eef2LbwSybCtq/k9G0hDV0csd9QAz9pTtLapn rQk8jg/9PXzcKEQRDFdiy9dQ/bI7p481bsdYzH/ziaAb0Cm4zcfU6QkC+fzjr3TDT0lI Q3jGbScQ/HygdUrPbooOZsSmfVW+aaXMa0KrGEIfAHGQv0D/WN09t1XMz61eeYoXFaqL qvcQ4zk8eZLctAhDDljxc6cru/I3Z6mwqsIffplcvFonKy6gM+E7lq7xMXsYtNg4YCo0 HXJQ== 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=xgcS8fkdpjw1BUKteA5o2DXcPrUod5cMLHi1jw/nFX0=; b=X2emcZIhzWjzt1GhQmZ7PhlRIn5QEcJod7Hnyln5+mH9BUZ6UlT0aJx6JdsXTEwIHH Un/iJSY6T2cIPutqogswXB6vtBQmw2B2cIY3wVuxAAJz+bkKD4U4ABXClb5AAP1lohvp jSZlZIMIHVxrr9EF2bOu3XQV89eFOzjthfpBsTzCppwKXQUNCU7QofmuAOu0Itl1g8Ib X00c9tdQC6LxscPzRfnYEz7Jj6WITrw3L27Bh/4CYj3Y7wHYzrnKqUmThmZiRRwywb+w J/tBDVegNsTGbn9XPBe0tqf/OjGnNwysZc81iuqE+LQvfUiHi+9mKsX5cXkLsygnKWuS RK7A== 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 d4si9383314jak.4.2021.08.28.11.06.05; Sat, 28 Aug 2021 11:06:17 -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 S230147AbhH1SEw (ORCPT + 99 others); Sat, 28 Aug 2021 14:04:52 -0400 Received: from netrider.rowland.org ([192.131.102.5]:40695 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S229912AbhH1SEv (ORCPT ); Sat, 28 Aug 2021 14:04:51 -0400 Received: (qmail 291460 invoked by uid 1000); 28 Aug 2021 14:03:58 -0400 Date: Sat, 28 Aug 2021 14:03:58 -0400 From: Alan Stern To: syzbot Cc: gregkh@linuxfoundation.org, johan@kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, mathias.nyman@linux.intel.com, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] INFO: task hung in do_proc_bulk Message-ID: <20210828180358.GA291431@rowland.harvard.edu> References: <000000000000a83c6a05caa09572@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000000000000a83c6a05caa09572@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 28, 2021 at 08:52:17AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: d5ae8d7f85b7 Revert "media: dvb header files: move some he.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=155fa21e300000 > kernel config: https://syzkaller.appspot.com/x/.config?x=2fd902af77ff1e56 > dashboard link: https://syzkaller.appspot.com/bug?extid=ada0f7d3d9fd2016d927 > compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a1ab0e300000 > > Bisection is inconclusive: the issue happens on the oldest tested release. > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15662ee1300000 > final oops: https://syzkaller.appspot.com/x/report.txt?x=17662ee1300000 > console output: https://syzkaller.appspot.com/x/log.txt?x=13662ee1300000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+ada0f7d3d9fd2016d927@syzkaller.appspotmail.com > > INFO: task syz-executor.0:8700 blocked for more than 143 seconds. > Not tainted 5.14.0-rc7-syzkaller #0 > "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > task:syz-executor.0 state:D stack:23192 pid: 8700 ppid: 8455 flags:0x00004004 > Call Trace: > context_switch kernel/sched/core.c:4681 [inline] > __schedule+0xc07/0x11f0 kernel/sched/core.c:5938 > schedule+0x14b/0x210 kernel/sched/core.c:6017 > schedule_timeout+0x98/0x2f0 kernel/time/timer.c:1857 > do_wait_for_common+0x2da/0x480 kernel/sched/completion.c:85 > __wait_for_common kernel/sched/completion.c:106 [inline] > wait_for_common kernel/sched/completion.c:117 [inline] > wait_for_completion_timeout+0x46/0x60 kernel/sched/completion.c:157 > usb_start_wait_urb+0x167/0x550 drivers/usb/core/message.c:63 > do_proc_bulk+0x978/0x1080 drivers/usb/core/devio.c:1236 Looks like the wait needs to be interruptible. Alan Stern #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d5ae8d7f85b7 Index: usb-devel/drivers/usb/core/message.c =================================================================== --- usb-devel.orig/drivers/usb/core/message.c +++ usb-devel/drivers/usb/core/message.c @@ -60,12 +60,18 @@ static int usb_start_wait_urb(struct urb goto out; expire = timeout ? msecs_to_jiffies(timeout) : MAX_SCHEDULE_TIMEOUT; - if (!wait_for_completion_timeout(&ctx.done, expire)) { + retval = wait_for_completion_interruptible_timeout(&ctx.done, expire); + if (retval <= 0) { usb_kill_urb(urb); - retval = (ctx.status == -ENOENT ? -ETIMEDOUT : ctx.status); + if (retval < 0) + retval = -EINTR; + else if (ctx.status == -ENOENT) + retval = -ETIMEDOUT; + else + retval = ctx.status; dev_dbg(&urb->dev->dev, - "%s timed out on ep%d%s len=%u/%u\n", + "%s timed out or interrupted on ep%d%s len=%u/%u\n", current->comm, usb_endpoint_num(&urb->ep->desc), usb_urb_dir_in(urb) ? "in" : "out",