Re: [syzbot] [wireless?] WARNING in kcov_remote_start (3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 17, 2024 at 11:16:31PM +0200, Andrey Konovalov wrote:
> > Hello.
> >
> > syzbot is still reporting warning in kcov_remote_start() from
> > __usb_hcd_giveback_urb() path. I guess that commit 8fea0c8fda30
> > ("usb: core: hcd: Convert from tasklet to BH workqueue") broke
> > the in_serving_softirq() workaround explained in commit e89eed02a5f1
> > ("kcov, usb: hide in_serving_softirq checks in __usb_hcd_giveback_urb").
> >
> > How can we fix this workaround?

> So the problem here is that __usb_hcd_giveback_urb gets called from an
> interrupt that comes during a __usb_hcd_giveback_urb call from
> usb_giveback_urb_bh. And KCOV annotations don't expect that
> __usb_hcd_giveback_urb can be interrupted.
> 
> We had a similar issue with USB/IP before, and AFAIU the resolution
> was that it's invalid to call usb_giveback_urb with interrupts enabled
> [1]. But I'm not sure if the same applies to usb_giveback_urb_bh.
> 
> Alan, is this a bug in usb_giveback_urb_bh? Perhaps we need to disable
> interrupts before calling __usb_hcd_giveback_urb?

Well, the code which used to run in a tasklet now runs in a work queue, 
so it's not surprising that some things can go wrong.

Perhaps the simplest approach is to disable interrupts in 
__usb_hcd_giveback_urb() around the kcov_* calls.  And change the 
preceding comment, of course.

Alan Stern

> Thank you!
> 
> [1] https://lore.kernel.org/linux-usb/20201006012333.GA399825@xxxxxxxxxxxxxxxxxxx/




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux