Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1050149ybl; Thu, 12 Dec 2019 08:54:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyFlsyHuuq2r5se4JZ+QsBNxUTCtl9I4L7dRkAPJaQr9d+9yz/zNZ6nPc4xlLAjV5J7YYja X-Received: by 2002:a54:4714:: with SMTP id k20mr5703931oik.125.1576169696131; Thu, 12 Dec 2019 08:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576169696; cv=none; d=google.com; s=arc-20160816; b=PwRHSClYcx7PR5UBF0alGMd97wGnn5ilP5/GQkpECilHoWySozgH2gg8eYhpqKT/YW dPareA60grM9tX29jLE4zNll+rDwoZl3BcDEKXgAoqrXxVsq3SzTVKVLLdhT0uavFWJh XgyrCrfL6rA/XgkRJul5dRomBGeqp++Uqb/c1kz4h5/nSxdQ+IC0ep5eIGt0pVMEqZDb cqoHMamTd7PuEvk8ulsIwUpb7BFuVL3S2xEVbdlvZz5fl5gbiVTyRTOZlFeN7pDfl9gk FLHusLg0dMhnUegxe66BQOqb/KSTte5lXMvRQKVuoLwDnwv1VztFSW1vfGPB85yo2Tk0 JJoQ== 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=ynCol2/Pkkan9y0yqntoVuT4+/KK1wDpshckqFWvxLA=; b=GY47x5XusGBccEp86hcOloDcsEQ7cx/Fl/6LHmjqNwlD8RFCRv5dBVwkY6q+FDVfBl bBV5J2cn12UMZ+h3kcNAUHlt6Yqg/JM2I90ysUu/ph6hQfmK8YORdvPs2Uvaoe87JnL/ pfsQ9/PEGUgUSLDc3eU/GKheyscrxmReBBa8RX1RcJcE04uxi39eoHXYZbP0/MBXl9bq AMvXYY4db79gFehHEOoJHflJ/5IzMEQzsCAGErBHRXTPGK37IZqWaNMxU/gr70y6uYwV bqkPs5aQfAr87a1/EBvLBdfEc4XRXspraAA8DC/H87068oiRPmkhnEIFHWRIoJZFbp+Y 3qhQ== 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 a128si3430482oib.142.2019.12.12.08.54.43; Thu, 12 Dec 2019 08:54:56 -0800 (PST) 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 S1730018AbfLLQwz (ORCPT + 99 others); Thu, 12 Dec 2019 11:52:55 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:52702 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1729927AbfLLQwz (ORCPT ); Thu, 12 Dec 2019 11:52:55 -0500 Received: (qmail 2315 invoked by uid 2102); 12 Dec 2019 11:52:54 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 12 Dec 2019 11:52:54 -0500 Date: Thu, 12 Dec 2019 11:52:54 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: syzbot cc: andreyknvl@google.com, , , Kernel development list , , USB list , , Subject: Re: general protection fault in usb_set_interface In-Reply-To: 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 [CC: list trimmed slightly -- including syzkaller-bugs] On Thu, 12 Dec 2019, Andrey Konovalov wrote: > Yes, the patch failed due to msleep() being undefined in that source > file. I'm not sure why syzbot didn't send a response. Could you try > resending the patch as the reply to that other syzbot report? This isn't literally a reply to the other syzbot report because I no longer have any copies of it in my mailbox. But it uses the same To: and Subject: lines, so hopefully it will be okay. This version of the patch adds #include , so now msleep() should be declared and there won't be any build errors. If you want me to send the old version that fails to build, let me know. Alan Stern #syz test: https://github.com/google/kasan.git 1f22d15c Index: usb-devel/drivers/media/usb/usbvision/usbvision-video.c =================================================================== --- usb-devel.orig/drivers/media/usb/usbvision/usbvision-video.c +++ usb-devel/drivers/media/usb/usbvision/usbvision-video.c @@ -49,6 +49,7 @@ #include #include +#include #include "usbvision.h" #include "usbvision-cards.h" @@ -1585,6 +1586,7 @@ static void usbvision_disconnect(struct wake_up_interruptible(&usbvision->wait_frame); wake_up_interruptible(&usbvision->wait_stream); } else { + msleep(100); usbvision_release(usbvision); } Index: usb-devel/drivers/media/v4l2-core/v4l2-dev.c =================================================================== --- usb-devel.orig/drivers/media/v4l2-core/v4l2-dev.c +++ usb-devel/drivers/media/v4l2-core/v4l2-dev.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -419,9 +420,10 @@ static int v4l2_open(struct inode *inode video_get(vdev); mutex_unlock(&videodev_lock); if (vdev->fops->open) { - if (video_is_registered(vdev)) + if (video_is_registered(vdev)) { + msleep(200); ret = vdev->fops->open(filp); - else + } else ret = -ENODEV; }