Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168310651
D59126.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
721 B
Referenced Files
None
Subscribers
None
D59126.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 28, 2:01 PM (5 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37186781
Default Alt Text
D59126.diff (721 B)
Attached To
Mode
D59126: tty: Revalidate after dropping the tty lock in ioctl handlers
Attached
Detach File
Event Timeline
Log In to Comment