Date: Mon, 12 Jul 2010 18:47:52 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 180842 for review Message-ID: <201007121847.o6CIlq6A082459@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@180842?ac=10 Change 180842 by trasz@trasz_victim on 2010/07/12 18:47:26 Update comments and remove workaround for some long forgotten problem. Affected files ... .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_hrl.c#86 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_hrl.c#86 (text+ko) ==== @@ -214,7 +214,6 @@ case HRL_SUBJECT_TYPE_LOGINCLASS: available = rule->hr_amount - cred->cr_loginclass->lc_container.c_resources[resource]; - available = INT64_MAX; /* XXX */ break; case HRL_SUBJECT_TYPE_JAIL: available = rule->hr_amount - @@ -275,18 +274,8 @@ mtx_lock(&hrl_lock); /* - * It seems we've hit a limit. Figure out what to do. There may - * be more than one matching limit; go through all of them. Denial - * should be done last, after logging and sending signals. - * - * Note that it is possible to get here, and still not trigger - * any limit, because some of the resource got freed on another - * CPU after computing contents of the 'available' array. - */ - /* - * XXX: We should sort the rules somewhat, so that 'log' and 'sig' - * rules come before before 'deny', to spare iterations over - * the p_container.c_rule_links. + * There may be more than one matching rule; go through all of them. + * Denial should be done last, after logging and sending signals. */ LIST_FOREACH(link, &p->p_container.c_rule_links, hrl_next) { rule = link->hrl_rule;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007121847.o6CIlq6A082459>