Commit d13549f8 authored by Jiri Slaby's avatar Jiri Slaby Committed by Live-CD User

cyclades: add tty refcounting

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: 's avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: 's avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1607acae
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment