Re: FTDI removal oops

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

 



On Mon, 18 May 2009, David Woodhouse wrote:

> On Mon, 2009-05-18 at 01:31 +0200, Daniel Mack wrote:
> > Ok, good - thanks for testing. Would you care to send that with a
> > commit log and your sign-off?
> 
> I suppose so, if I drop the addition of cancel_delayed_work_sync() to
> ftdi_sio_port_remove(). That doesn't need to be there, AFAICT -- there
> can't be any work outstanding unless the device is open anyway. And the
> private data structure isn't going away until the device is closed... at
> which point the pending work gets flushed appropriately.

If you say so...  I haven't followed the driver's logic all the way 
through.

The mere fact that the delayed_work gets cancelled _eventually_ might
not be good enough.  In particular, the driver isn't supposed to submit
any URBs after usb_serial_disconnect() returns, regardless of whether
or not the device file is open.

So if there's a chance the delayed_work routine could submit an URB, it 
really should be cancelled during ftdi_sio_port_remove().

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux