Fixes to controlling tty handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest10 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | tty: Remove tty_pair_get_tty()/tty_pair_get_pty() apidrivers/ include/ | +5 | 0 replies | |
| 2/10 | tty: Reorder proc_set_tty() and related fnsdrivers/ | +62 | 0 replies | |
| 3/10 | tty: Remove tsk parameter from proc_set_tty()drivers/ | +14 | 0 replies | |
| 4/10 | uml: Fix unsafe pid reference to foreground process grouparch/ | +5 | 1 reply | |
| 5/10 | tty: Replace open-coded tty_get_pgrp()drivers/ drivers/ | +8 | 0 replies | |
| 6/10 | tty: Remove !tty condition from __proc_set_tty()drivers/ | +12 | 0 replies | |
| 7/10 | tty: Fix multiple races when setting the controlling terminaldrivers/ | +17 | 0 replies | |
| 8/10 | tty: Move session_of_pgrp() and make staticdrivers/ include/ kernel/ | +21 | 0 replies | |
| 9/10 | tty: Serialize proc_set_tty() with tty_lockdrivers/ | +5 | 0 replies | |
| 10/10 | tty: Update code comment in __proc_set_tty()drivers/ | +4 | 0 replies |
Reviews trailers per patch
1 of 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Richard Weinberger | Alan Cox |
|---|---|---|
| Series | R-b | |
| 1/10 | ||
| 2/10 | ||
| 3/10 | ||
| 4/10 | A-b | |
| 5/10 | ||
| 6/10 | ||
| 7/10 | ||
| 8/10 | ||
| 9/10 | ||
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH -next 00/10] Fixes to controlling tty handling
Hi Greg,
This patch series:
1. removes stale code from the controlling tty handling functions
2. relocates the ctty functions to eliminate forward declarations
3. fixes several unsafe races when setting the controlling tty
4. eliminates holding tty_mutex as a necessary condition of setting the controlling terminal
#4 is part of an overall effort to reduce the tty_mutex footprint.
Unfortunately, this series does not fix two other race conditions:
1. disassociate_ctty()/no_tty() does not teardown the tty<->process associations atomically wrt job control, so it is possible to observe spurious error conditions from job control (tty_check_change() and job_control()). I'm looking into inverting the lock order of tty->ctrl_lock and tsk->sighand->siglock() to see if holding ctrl_lock is a suitable solution for atomic teardown. Especially now that ctrl_lock is not used for flow control anymore :)
2. task_pgrp() and task_session() are used unsafely. These fixes will be clearer after #1 is fixed.
Regards,
Peter Hurley (10):
tty: Remove tty_pair_get_tty()/tty_pair_get_pty() api
tty: Reorder proc_set_tty() and related fns
tty: Remove tsk parameter from proc_set_tty()
uml: Fix unsafe pid reference to foreground process group
tty: Replace open-coded tty_get_pgrp()
tty: Remove !tty condition from __proc_set_tty()
tty: Fix multiple races when setting the controlling terminal
tty: Move session_of_pgrp() and make static
tty: Serialize proc_set_tty() with tty_lock
tty: Update code comment in __proc_set_tty()
arch/um/drivers/line.c | 6 +- drivers/tty/pty.c | 24 ++---- drivers/tty/tty_io.c | 204 +++++++++++++++++++++++++++---------------------- include/linux/kernel.h | 3 - include/linux/tty.h | 3 - kernel/exit.c | 21 ----- 6 files changed, 123 insertions(+), 138 deletions(-)
Signature · 1 line
2.1.1