PERFORCE change 167188 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Mon Aug 10 19:29:49 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=167188
Change 167188 by trasz at trasz_anger on 2009/08/10 19:29:42
Fix a bug, enable kassert.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_hrl.c#54 edit
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_prot.c#20 edit
Differences ...
==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_hrl.c#54 (text+ko) ====
@@ -599,12 +599,10 @@
#endif
mtx_lock(&hrl_lock);
-#ifdef notyet
KASSERT(amount <= p->p_usage.hu_resources[resource],
("hrl_free_proc: freeing %lld of %s, which is more than allocated "
"%lld for %s (pid %d)", amount, hrl_resource_name(resource),
p->p_usage.hu_resources[resource], p->p_comm, p->p_pid));
-#endif
p->p_usage.hu_resources[resource] -= amount;
cred = p->p_ucred;
cred->cr_ruidinfo->ui_usage.hu_resources[resource] -= amount;
==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_prot.c#20 (text+ko) ====
@@ -2266,14 +2266,11 @@
{
(void)chgproccnt(newcred->cr_ruidinfo, -1, 0);
- hrl_free(HRL_RESOURCE_MAXPROCESSES, 1);
newcred->cr_ruid = ruip->ui_uid;
uihold(ruip);
uifree(newcred->cr_ruidinfo);
newcred->cr_ruidinfo = ruip;
(void)chgproccnt(newcred->cr_ruidinfo, 1, 0);
- /* XXX: What about the return value? */
- hrl_alloc(HRL_RESOURCE_MAXPROCESSES, 1);
}
/*-
More information about the p4-projects
mailing list