Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp92456pxu; Tue, 1 Dec 2020 06:53:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtixygOAmmbRvFuXzuLF039/Jq2apsuphI1B076ZcZUgnMCWf5EM6H7S9tLMzTbfRzzBXm X-Received: by 2002:a50:9d04:: with SMTP id v4mr3366855ede.363.1606834423082; Tue, 01 Dec 2020 06:53:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606834423; cv=none; d=google.com; s=arc-20160816; b=jImvdRBSwW1eHz5jrbF91r5P6d8V6GdUZUGcAQcu6votD0skgLqd1N+1fLfWnnW/VQ dw4LMYRQd5pd1MOnkxpJmIR+meeFyx+mn0N9evEigsju3PGLRrALRPL/hOYWkgQeTXQX fHfeKx7x8wFGUgRI70or1ZS7cvjxLq9NpJL9vOMW4Ih3agMxrSdUw5fV1Lz1bjvaDl1p JjWFtfHdJqe/Hnob5632b4BllwB7SCgIzcT0jru871kMaa5Aj6Zd+Xy9puFMJA2Hl1vh mL7E/QsoFjPc9TXjveLKkd/yaRByeGhaGFfeuYd5P4zWA0MRGHZUHRBT5+apP5rla8Py Ofaw== 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=iFzq6yCVuU+3HwMOJOCltzpUkbbU2mcuN6GWJQmdTF8=; b=a9YuoTHZ+NXYi6fmSRg03HPGRQZeOBOPsc+Gq1ZuBllKnrgIYC6ZLCKg/2iAgRlHpB v/yPYDfVArdkrzy5esGYBXoQrCR83dt+pkmwNypkRn+qGF8OIupVVfECXx+V6vX1qI81 w3bDi1NAHJ05t92Rxe2aWQ8+waqHLCbDGrmesyx5NwteX82FR/R714E46MyrsuOmOLdU HTmpxQ3DyvIbaA5sM1SW4Sd155yliul/gk6do2UjsKtISlB84S0gIPalUpXxy907Bd+G 1xPnFTHuGJjkyT6Wva9SU/Zm+l88oFwkmdcOKvchibfjcggDeRKV3IxAW1EvkY8nax3X tJ4w== 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 a12si28659ejg.220.2020.12.01.06.52.58; Tue, 01 Dec 2020 06:53:43 -0800 (PST) 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 S2403931AbgLAOvf (ORCPT + 99 others); Tue, 1 Dec 2020 09:51:35 -0500 Received: from netrider.rowland.org ([192.131.102.5]:33877 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S2389627AbgLAOve (ORCPT ); Tue, 1 Dec 2020 09:51:34 -0500 Received: (qmail 1007173 invoked by uid 1000); 1 Dec 2020 09:50:53 -0500 Date: Tue, 1 Dec 2020 09:50:53 -0500 From: Alan Stern To: Greg KH Cc: Hillf Danton , syzbot , eli.billauer@gmail.com, gustavoars@kernel.org, ingrassia@epigenesys.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, syzkaller-bugs@googlegroups.com, tiwai@suse.de Subject: Re: WARNING in port100_send_frame_async/usb_submit_urb Message-ID: <20201201145053.GA1005384@rowland.harvard.edu> References: <000000000000bab70f05b563a6cc@google.com> <20201201094702.1762-1-hdanton@sina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 01, 2020 at 10:59:06AM +0100, Greg KH wrote: > On Tue, Dec 01, 2020 at 05:47:02PM +0800, Hillf Danton wrote: > > On Tue, 01 Dec 2020 01:21:27 -0800 > > > syzbot found the following issue on: > > > > > > HEAD commit: c84e1efa Merge tag 'asm-generic-fixes-5.10-2' of git://git.. > > > git tree: upstream > > > console output: https://syzkaller.appspot.com/x/log.txt?x=14a98565500000 > > > kernel config: https://syzkaller.appspot.com/x/.config?x=7be70951fca93701 > > > dashboard link: https://syzkaller.appspot.com/bug?extid=dbec6695a6565a9c6bc0 > > > compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project.git ca2dcbd030eadbf0aa9b660efe864ff08af6e18b) > > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17c607f1500000 > > > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > > Reported-by: syzbot+dbec6695a6565a9c6bc0@syzkaller.appspotmail.com > > > > > > usb 1-1: string descriptor 0 read error: -32 > > > ------------[ cut here ]------------ > > > URB 000000005c26bc1e submitted while active > > Clear urb before putting it in use. > > > > --- a/drivers/nfc/port100.c > > +++ b/drivers/nfc/port100.c > > @@ -1525,7 +1525,7 @@ static int port100_probe(struct usb_inte > > } > > > > dev->in_urb = usb_alloc_urb(0, GFP_KERNEL); > > - dev->out_urb = usb_alloc_urb(0, GFP_KERNEL); > > + dev->out_urb = usb_alloc_urb(0, GFP_KERNEL | __GFP_ZERO); > > > > if (!dev->in_urb || !dev->out_urb) { > > nfc_err(&interface->dev, "Could not allocate USB URBs\n"); > > How does this solve a warning in the USB core about a string descriptor > error? Greg, you misread the bug report. The problem wasn't the string descriptor read error; it was URB submitted while active. More to the point, adding __GFP_ZERO to the usb_alloc_urb call won't fix anything, because usb_alloc_urb calls usb_init_urb, which already does a memset. Alan Stern