Skip to content
  • Arnd Bergmann's avatar
    tty: synclink: avoid sleep_on race · b8c98ae4
    Arnd Bergmann authored
    
    
    The four variants of the synclink driver use the same code in their
    open() callback to wait for a port in process of being closed,
    using interruptible_sleep_on, which is racy and going away soon.
    
    Making things worse, these functions hold the BTM while doing so,
    which means that if we ever enter this code path, we cannot actually
    continue since the other thread that is in process of closing the
    port can no longer get the BTM.
    
    This addresses both issues by using wait_event_interruptible_tty()
    instead.
    
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Jiri Slaby <jslaby@suse.cz>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    b8c98ae4