Re: Mutex deadlock from garmin_close in garmin_gps.c

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

 



2009/4/5 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
>
> BTW, I'm concerned about that usb-serial.c patch posted earlier.  In

what is the purpose of the patch? which fixes?

> particular, does serial_open() hold disc_mutex long enough?  What

IMHO, it is not a kind of open/disconnect race, serial_port_open() is more
proper than serial_open(). Once usb_serial_get_by_index() returns a non NULL
serial, the port device doesn't disappear even if the usb serial
device is disconnected.
So, maybe holding disc_mutex in serial_open is not necessary.

> happens if a disconnect occurs while serial_open() is waiting to
> acquire port->mutex?  Do you think the calls to

mutex_lock_interruptible() should return a failed value.

> usb_autopm_get_interface() and serial->type->open() should also be
> protected by disc_mutex?
>
> Alan Stern
>
>


-- 
Lei Ming
--
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