Date: Thu, 17 Aug 2006 20:55:39 GMT From: Chris Jones <cdjones@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 104436 for review Message-ID: <200608172055.k7HKtdCq092156@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=104436 Change 104436 by cdjones@cdjones_meanook on 2006/08/17 20:55:33 Fix kernel panics by being more paranoid about KSEs having credentials. Affected files ... .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#16 edit Differences ... ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#16 (text+ko) ==== @@ -550,7 +550,8 @@ continue; kg->kg_estcpu = decay_cpu(loadfac, kg->kg_estcpu); total_est_cpu += kg->kg_estcpu; - if (kg->kg_proc->p_ucred->cr_prison) + if (NULL != kg->kg_proc->p_ucred && + NULL != kg->kg_proc->p_ucred->cr_prison) kg->kg_proc->p_ucred->cr_prison->pr_estcpu += kg->kg_estcpu; resetpriority(kg); @@ -641,7 +642,9 @@ resetpriority(struct ksegrp *kg) { register unsigned int newpriority; - struct prison *pr = kg->kg_proc->p_ucred->cr_prison; + struct prison *pr = NULL; + if (NULL != kg->kg_proc->p_ucred) + pr = kg->kg_proc->p_ucred->cr_prison; if (kg->kg_pri_class == PRI_TIMESHARE) { newpriority = PUSER + kg->kg_estcpu / INVERSE_ESTCPU_WEIGHT +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608172055.k7HKtdCq092156>