Page MenuHomeFreeBSD

D59126.id184790.diff
No OneTemporary

D59126.id184790.diff

diff --git a/sys/kern/tty.c b/sys/kern/tty.c
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1892,7 +1892,12 @@
/* XXX: This looks awful. */
tty_unlock(tp);
sx_xlock(&proctree_lock);
- tty_lock(tp);
+ error = ttydev_enter(tp);
+ if (error != 0) {
+ sx_xunlock(&proctree_lock);
+ tty_lock(tp);
+ return (error);
+ }
if (!SESS_LEADER(p)) {
/* Only the session leader may do this. */
@@ -1959,7 +1964,12 @@
pg != NULL ? pg->pg_id : -1,
td->td_proc->p_session->s_sid));
}
- tty_lock(tp);
+ error = ttydev_enter(tp);
+ if (error != 0) {
+ sx_sunlock(&proctree_lock);
+ tty_lock(tp);
+ return (error);
+ }
/*
* Determine if this TTY is the controlling TTY after

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 28, 2:40 PM (2 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37186781
Default Alt Text
D59126.id184790.diff (721 B)

Event Timeline