• Johan Hovold's avatar
    USB: serial: drop obsolete open-race workaround · e1fdd5b2
    Johan Hovold authored
    Commit a65a6f14 ("USB: serial: fix race between probe and open")
    fixed a race between probe and open, which could lead to crashes when a
    not yet fully initialised port was being opened.
    
    This race was later incidentally closed by commit 7e73eca6 ("TTY:
    move cdev_add to tty_register_device") which moved character-device
    registration from tty_register_driver to tty_register_device, which
    isn't called until the port has been fully set up.
    
    Remove the now redundant workaround which had the negative side effect
    of not allowing a port to be opened immediately after user space had
    been notified of a new tty device.
    Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    e1fdd5b2
usb-serial.c 37.7 KB