On (Mon) 29 Jul 2013 [14:18:52], Rusty Russell wrote: > Amit Shah <amit.shah@xxxxxxxxxx> writes: > > There's a window between find_port_by_devt() returning a port and us > > taking a kref on the port, where the port could get unplugged. Fix it > > by taking the reference in find_port_by_devt() itself. > > > > Problem reported and analyzed by Mateusz Guzik. > > This fix is clearly correct, but what about the other find_port_by_* > functions? They don't need a kref -- the kref is only to be bumped when: 1. Initialising / Plugging in the port (add_port) 2. Opening the port (this fix) Both these cases are now covered. As part of the locking rework, the other find_port_by_* functions may be reworked to set some state, like port_in_use, instead of abusing guest_connected today. Amit -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html