Date: Wed, 16 Aug 2006 20:48:08 GMT From: Chris Jones <cdjones@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 104291 for review Message-ID: <200608162048.k7GKm8rs029413@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=104291 Change 104291 by cdjones@cdjones_meanook on 2006/08/16 20:47:17 Fix crash in schedcpu. No, Virginia, when you try writing to a NULL value (i.e. when a process isn't jailed), good things do not happen. Affected files ... .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#11 edit Differences ... ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#11 (text+ko) ==== @@ -541,7 +541,9 @@ if (kg->kg_slptime > 1) continue; kg->kg_estcpu = decay_cpu(loadfac, kg->kg_estcpu); - kg->kg_proc->p_ucred->cr_prison->pr_estcpu += kg->kg_estcpu; + if (kg->kg_proc->p_ucred->cr_prison) + kg->kg_proc->p_ucred->cr_prison->pr_estcpu += + kg->kg_estcpu; resetpriority(kg); FOREACH_THREAD_IN_GROUP(kg, td) { resetpriority_thread(td, kg);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608162048.k7GKm8rs029413>