PERFORCE change 104291 for review
Chris Jones
cdjones at FreeBSD.org
Wed Aug 16 20:48:09 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104291
Change 104291 by cdjones at 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);
More information about the p4-projects
mailing list