> The device is going away, so there's no point in updating the > permissions on the device file. The correct thing to do is to delete > the file. However someone has the file open still what happens if the disconnect races fchmod() > patch. A device could be unplugged while no process was holding its > file open, thus causing its minor to be released immediately. Then a > new device could be plugged in and accessed before the device file's > permissions were changed. In which case you can't race fchmod at least. A lot of drivers don't reuse minor numbers at all nowdays for exactly these reasons. The tty layer can't yet cope with that however. I raise it as a point of discussion. I'm not sure what the right answer is. -- 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