Page MenuHomeFreeBSD

D44086.diff
No OneTemporary

D44086.diff

diff --git a/sys/kern/tty.c b/sys/kern/tty.c
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1315,7 +1315,8 @@
struct xtty *xtlist, *xt;
struct tty *tp;
struct proc *p;
- int cansee, error;
+ int error;
+ bool cansee;
sx_slock(&tty_list_sx);
lsize = tty_list_count * sizeof(struct xtty);
@@ -1328,8 +1329,8 @@
TAILQ_FOREACH(tp, &tty_list, t_list) {
tty_lock(tp);
- if (tp->t_session != NULL) {
- p = tp->t_session->s_leader;
+ if (tp->t_session != NULL &&
+ (p = atomic_load_ptr(&tp->t_session->s_leader)) != NULL) {
PROC_LOCK(p);
cansee = (p_cansee(td, p) == 0);
PROC_UNLOCK(p);

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 25, 8:24 AM (14 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12747122
Default Alt Text
D44086.diff (619 B)

Event Timeline