Page MenuHomeFreeBSD

D44086.id135013.diff
No OneTemporary

D44086.id135013.diff

Index: sys/kern/tty.c
===================================================================
--- sys/kern/tty.c
+++ sys/kern/tty.c
@@ -1314,7 +1314,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);
@@ -1327,8 +1328,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(&s->s_leader)) != NULL) {
PROC_LOCK(p);
cansee = (p_cansee(td, p) == 0);
PROC_UNLOCK(p);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 29, 3:22 PM (13 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26342675
Default Alt Text
D44086.id135013.diff (647 B)

Event Timeline