diff options
-rw-r--r-- | sys/kern/kern_fork.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_kthread.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_proc.c | 2 | ||||
-rw-r--r-- | sys/kern/tty.c | 2 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 3 |
5 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index d6c716facff3..3223f8b55386 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -417,7 +417,6 @@ again: LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash); sx_xunlock(&allproc_lock); - /* * Make a proc table entry for the new process. * Start by zeroing the section of proc that is zero-initialized, diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index af499a898211..a456a86fa489 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -81,7 +81,8 @@ kthread_create(void (*func)(void *), void *arg, if (!proc0.p_stats /* || proc0.p_stats->p_start.tv_sec == 0 */) panic("kthread_create called too soon"); - error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, &p2); + error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, + &p2); if (error) return error; diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 572244d8bb0b..85529c97c8cc 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -151,6 +151,7 @@ kse_link(struct kse *ke, struct ksegrp *kg) static void ksegrp_link(struct ksegrp *kg, struct proc *p) { + TAILQ_INIT(&kg->kg_threads); TAILQ_INIT(&kg->kg_runq); /* links with td_runq */ TAILQ_INIT(&kg->kg_slpq); /* links with td_runq */ @@ -173,6 +174,7 @@ void proc_linkup(struct proc *p, struct ksegrp *kg, struct kse *ke, struct thread *td) { + TAILQ_INIT(&p->p_ksegrps); /* all ksegrps in proc */ TAILQ_INIT(&p->p_threads); /* all threads in proc */ diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 01c31096cc45..5c778b7f98c7 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2333,14 +2333,12 @@ ttyinfo(tp) else { mtx_lock_spin(&sched_lock); - /* Pick interesting process. */ for (pick = NULL; p != 0; p = LIST_NEXT(p, p_pglist)) if (proc_compare(pick, p)) pick = p; td = FIRST_THREAD_IN_PROC(pick); - stmp = pick->p_stat == SRUN ? "running" : /* XXXKSE */ td->td_wmesg ? td->td_wmesg : "iowait"; calcru(pick, &utime, &stime, NULL); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a37133d5de3c..ddd4ff6f3dab 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2560,8 +2560,7 @@ vfs_unmountall() if (curthread != NULL) td = curthread; else -/* XXX XXX should this be proc0? */ - td = FIRST_THREAD_IN_PROC(initproc); + td = FIRST_THREAD_IN_PROC(initproc); /* XXX XXX proc0? */ /* * Since this only runs when rebooting, it is not interlocked. */ |