On Thu, 3 Sep 2009, Ming Lei wrote: > > - ++port->port.count; > > + spin_lock_irq(&port->port.lock); > > + if (!tty_hung_up_p(filp)) > > + ++port->port.count; > > + spin_unlock_irq(&port->port.lock); > > The lock is still needed in usb_console_setup() to protect port->port.count, > isn't it? Is it? I don't know. The lock is needed to protect against concurrent open, close, and hangup events. Does usb_console_setup() run before any of those things can occur? One thing that _is_ clear is that usb_console_setup() needs to release serial->disc_mutex. I didn't notice that it called usb_serial_get_by_index(). 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