RE: [PATCH v1] usb: f_mass_storage: reduce chance to queue disable ep

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

 



> From: yuanlinyu
> Sent: Thursday, March 14, 2024 4:14 PM
> To: 'Oliver Neukum' <oneukum@xxxxxxxx>; Alan Stern
> <stern@xxxxxxxxxxxxxxxxxxx>; Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-usb@xxxxxxxxxxxxxxx; stable@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH v1] usb: f_mass_storage: reduce chance to queue disable ep
> 
> > From: Oliver Neukum <oneukum@xxxxxxxx>
> > Sent: Thursday, March 14, 2024 3:54 PM
> >
> >
> > Sorry, now for the longer explanation. You'd introduce a deadlock.
> > You just cannot sleep with a spinlock held. It seems to me that
> 
> I didn't review usb_ep_queue() clearly, in my test, I didn't hit sleep.
> But the concern is good, will find better way to avoid it.

Oliver, could you share one example which can sleep ?

I check several UDC drivers, like dwc3, cdnsp, cdns3, 
Both disable/queue function have spinlock, this means no sleep, right ?

> 
> > if you want to do this cleanly, you need to revisit the locking
> > to use locks you can sleep under.
> >
> > 	HTH
> > 		Oliver




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

  Powered by Linux