Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2589621pxu; Sat, 10 Oct 2020 00:19:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNcub2+OG7SVHtS3mAwWNMDRzItFMuFmYvkRerQ/oZFADcChKut+xLyeJqeI3CYNN3t+Jn X-Received: by 2002:a05:6402:142a:: with SMTP id c10mr3241366edx.261.1602314380853; Sat, 10 Oct 2020 00:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602314380; cv=none; d=google.com; s=arc-20160816; b=YmKoVddI7KoaQFps32N8+L9l7m48r8vTy2E+BwYug1suBqtRmLB2nfWHa0rR7P8zOp AJcdTIYwX2a3iScooRxxJazMqf4S8O7ElbU/DI6lHdvYSTV4oA3/avD+BpNVAleyuB3O DyrrqQal+nweJVjaUF8PZVruDoiUNbZqlk5am3IE9p+frh654SqN3exif1SGHC25g7ow 0xZqJdmplat1qQDfbWtG0oPooYio/HDOh7bBxRZNZSth3rpbLNhywnD+e/bRtrFDydYe 6I0rY4LF+nTGMhzm3v93GLQvpInmOdfmdVOQHTfWF6n4XnEcPrLKZhneT1OqGLSDEYqs tS6A== 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=HADsG9X89JQXNOqeOl15CLMw4t3hLe+svt2OHdvN5OI=; b=qYDjkSPg6rB0yur4AldvGS2d4cbhFm2mD2cBtVmut3x75YvZGkXdr1hTpMnbaV8NMK 5fnsdo5GilTroTTPlRMWuwGiBzyZGz5MIVwPNATUhym0PIk2TjdWGlz29ipKwERYuQ6A eX2t1hAwKQKmxJu9OqkAjYU4uVD48LVdZDopmGOmK7Y67IPAFAq8w0z8n94GNKSv3qvP sHS9XDSJVgHxTVujV86vL02VFFH5b9NJmuib+pFZAdr57eJRcLa0oBJ0lvYIWXnMvGUj GebrDbpkMQ+uqzk/Vr7n5+gu4L1+KRyNVLHxVSfP7thapQ8GyD8WKylgimmmOty7ZuOV Pw+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 p24si7597323edm.360.2020.10.10.00.19.15; Sat, 10 Oct 2020 00:19:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729610AbgJJBhs (ORCPT + 99 others); Fri, 9 Oct 2020 21:37:48 -0400 Received: from netrider.rowland.org ([192.131.102.5]:33919 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1729597AbgJJBQ2 (ORCPT ); Fri, 9 Oct 2020 21:16:28 -0400 Received: (qmail 557292 invoked by uid 1000); 9 Oct 2020 20:49:44 -0400 Date: Fri, 9 Oct 2020 20:49:44 -0400 From: Alan Stern To: syzbot Cc: andreyknvl@google.com, ath9k-devel@qca.qualcomm.com, eli.billauer@gmail.com, gregkh@linuxfoundation.org, gustavoars@kernel.org, ingrassia@epigenesys.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, oneukum@suse.com, syzkaller-bugs@googlegroups.com, tiwai@suse.de Subject: Re: WARNING in hif_usb_send/usb_submit_urb Message-ID: <20201010004944.GB557008@rowland.harvard.edu> References: <20201009185548.GA546075@rowland.harvard.edu> <00000000000088939405b1440053@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00000000000088939405b1440053@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Oct 09, 2020 at 02:55:08PM -0700, syzbot wrote: > Hello, > > syzbot tried to test the proposed patch but the build/boot failed: > > drivers/net/wireless/ath/ath9k/hif_usb.c:1319:7: error: implicit declaration of function 'usb_find_bulk_in'; did you mean 'usb_fill_bulk_urb'? [-Werror=implicit-function-declaration] Let's try again, using a different repository. #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v5.9-rc8 Index: usb-devel/drivers/net/wireless/ath/ath9k/hif_usb.c =================================================================== --- usb-devel.orig/drivers/net/wireless/ath/ath9k/hif_usb.c +++ usb-devel/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -1307,6 +1307,20 @@ static int ath9k_hif_usb_probe(struct us struct usb_device *udev = interface_to_usbdev(interface); struct hif_device_usb *hif_dev; int ret = 0; + struct usb_host_interface *alt; + struct usb_endpoint_descriptor *epd; + + /* Verify the expected endpoints are present */ + alt = interface->cur_altsetting; + if (!usb_find_int_in_endpoint(alt, &epd) || + usb_endpoint_num(epd) != USB_REG_IN_PIPE || + !usb_find_int_out_endpoint(alt, &epd) || + usb_endpoint_num(epd) != USB_REG_OUT_PIPE || + !usb_find_bulk_in(endpoint(alt, &epd) || + usb_endpoint_num(epd) != USB_WLAN_RX_PIPE || + !usb_find_bulk_out(endpoint(alt, &epd) || + usb_endpoint_num(epd) != USB_WLAN_TX_PIPE) + return -ENODEV; if (id->driver_info == STORAGE_DEVICE) return send_eject_command(interface);