Date: Sat, 31 Aug 2002 13:32:54 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 16865 for review Message-ID: <200208312032.g7VKWspv010965@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16865 Change 16865 by mini@mini_stylus on 2002/08/31 13:32:37 Add a test and warning against a proc with no threads. Such a proc should never exist, but it caused 'ps ax' to kernel panic when I did that accidentally. Affected files ... .. //depot/projects/kse/sys/kern/kern_proc.c#79 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_proc.c#79 (text+ko) ==== @@ -825,6 +825,13 @@ } if (p->p_state != PRS_ZOMBIE) { td = FIRST_THREAD_IN_PROC(p); + if (td == NULL) { + /* XXXKSE: This should never happen. */ + printf("fill_kinfo_proc(): pid %d has no threads!\n", + p->p_pid); + mtx_unlock_spin(&sched_lock); + return; + } if (!(p->p_flag & P_KSES)) { if (td->td_wmesg != NULL) { strncpy(kp->ki_wmesg, td->td_wmesg, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208312032.g7VKWspv010965>