linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Hillf Danton <hdanton@sina.com>,
	syzbot <syzbot+dbec6695a6565a9c6bc0@syzkaller.appspotmail.com>,
	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
Date: Tue, 1 Dec 2020 09:50:53 -0500	[thread overview]
Message-ID: <20201201145053.GA1005384@rowland.harvard.edu> (raw)
In-Reply-To: <X8YT6sbhhGwQ06nw@kroah.com>

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

  reply	other threads:[~2020-12-01 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  9:21 WARNING in port100_send_frame_async/usb_submit_urb syzbot
     [not found] ` <20201201094702.1762-1-hdanton@sina.com>
2020-12-01  9:59   ` Greg KH
2020-12-01 14:50     ` Alan Stern [this message]
     [not found]   ` <20201201103626.1819-1-hdanton@sina.com>
2020-12-01 16:41     ` Greg KH
2020-12-02 21:19 ` Alan Stern
2021-10-22 17:46 ` [syzbot] " syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201145053.GA1005384@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=eli.billauer@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=hdanton@sina.com \
    --cc=ingrassia@epigenesys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=syzbot+dbec6695a6565a9c6bc0@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).