Ian Abbott 00d6058ac9 [PATCH] USB serial visor: fix race in open/close
The anti user-DoS mechanism in the USB serial 'visor' driver can fail in
the following way:

visor_open: priv->outstanding_urbs = 0
visor_write: ++priv->outstanding_urbs
visor_close:
visor_open: priv->outstanding_urbs = 0
visor_write_bulk_callback: --priv->outstanding_urbs

So priv->outstanding_urbs ends up as (unsigned long)(-1).  Not good!

I haven't seen this happen with the visor driver as I don't have the
hardware, but I have seen it while testing a patch to implement the same
functionality in the ftdi_sio driver (patch not yet submitted).

The fix is pretty simple: don't reinitialize outstanding_urbs in
visor_open.  (Again, I haven't tested the fix in visor, but I have
tested it in ftdi_sio.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
..
2006-07-08 13:30:09 -07:00
2006-07-10 13:24:12 -07:00
2006-07-10 13:24:25 -07:00
2006-07-12 12:52:55 -07:00
2006-06-23 07:43:06 -07:00
2006-07-12 12:59:35 -07:00
2006-07-03 15:27:07 -07:00
2006-07-10 13:24:27 -07:00
2006-07-10 13:24:17 -07:00
2006-07-10 13:24:15 -07:00
2006-07-03 21:29:08 -07:00
2006-07-10 14:50:33 -07:00
2006-07-12 12:59:35 -07:00
2006-07-12 16:41:55 +02:00
2006-06-23 07:43:06 -07:00
2006-06-17 21:18:43 -07:00