diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 17:51:56 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 23:38:51 +0400 |
commit | 26b23209c0ea5503824df60b8f218fb04b80cad0 (patch) | |
tree | 6225f9e7e4db8dc77023887e8e70539f8b185396 /include | |
parent | 91cedcde1e5feede6c1e4c2086ec4f3c84c56d4f (diff) | |
download | linux-26b23209c0ea5503824df60b8f218fb04b80cad0.tar.xz |
TTY: tty_driver, document tty->ops->shutdown limitation
Note that tty->ops->shutdown is called from whatever context the user
drops the last tty reference from. E.g. if one takes a reference in
an ISR, tty close happens on other CPU and the final tty put is from
the ISR, tty->ops->shutdown will be called from that hard irq context.
We would have a problem in vt if we start using tty refcounting from
other contexts than user there. It is because vt's shutdown uses
mutexes. This is yet to be fixed.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tty_driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index e064f1704e20..6e6dbb7447b6 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -50,6 +50,8 @@ * Note that tty_shutdown() is not called if ops->shutdown is defined. * This means one is responsible to take care of calling ops->remove (e.g. * via tty_driver_remove_tty) and releasing tty->termios. + * Note that this hook may be called from *all* the contexts where one + * uses tty refcounting (e.g. tty_port_tty_get). * * * void (*cleanup)(struct tty_struct * tty); |