Subject: Re: [PATCH 1/2 v5] usbnet: allow status interrupt URB to always be active

From: Oliver Neukum <[email-masked]>
Date: Thu, 11 Apr 2013 14:28:43 +0200

On Thursday 11 April 2013 20:11:13 Ming Lei wrote:
> On Thu, Apr 11, 2013 at 7:14 PM, Oliver Neukum <[email-masked]> wrote:
> >
> > Sorry, I misunderstood.
> 
> No problem, :-)
> 
> >
> > Task A                                  Task B                          queue
> >
> > queue work
> >                                                 request a reset
> >                                                                                         allocate memory and block
> >                                                 cancel the work
> >                                                                                         shit happened
> 
> If I understand the case correctly, the above deadlock can be avoided
> by canceling rx/tx URBs at the end of pre_reset() or usbnet_disconnect(),

No. cancel_work_sync() must wait for the work. The work will not finish.

	Regards
		Oliver