• Jiri Slaby's avatar
    cyclades: add tty refcounting · d13549f8
    Jiri Slaby authored
    While this is not problem for Y card handlers (they are protected
    by card_lock), Z handlers and other functions may dereference NULL
    at any point after hangup/close. Even if (tty == NULL) was already
    performed in the handler.
    
    Note that it's not an issue for Y cards just for now. After
    switching to tty_port_close_* et al. this will be a problem. So
    add refcounting to them all.
    
    Also proc .show doesn't take a tty reference and it should (along
    with a ldisc one).
    
    While at it and changing prototypes (adding tty param), prepend
    cy_ to functions which don't have it yet.
    Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
    Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    d13549f8
cyclades.c 155 KB