PERFORCE change 187812 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Fri Jan 14 20:20:02 UTC 2011
http://p4web.freebsd.org/@@187812?ac=10
Change 187812 by trasz at trasz_victim on 2011/01/14 20:19:22
Make the code less confusing.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#6 edit
Differences ...
==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#6 (text+ko) ====
@@ -77,7 +77,7 @@
*/
struct rctl_rule_link {
LIST_ENTRY(rctl_rule_link) rctl_next;
- struct rctl_rule *rctl_rule;
+ struct rctl_rule *rctl_rule;
};
struct dict {
@@ -141,7 +141,7 @@
static int rctl_rule_fully_specified(const struct rctl_rule *rule);
static void rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule);
-MALLOC_DEFINE(M_RCTL, "rctl", "Hierarchical Resource Limits");
+MALLOC_DEFINE(M_RCTL, "rctl", "Resource Limits");
static const char *
rctl_subject_type_name(int subject)
@@ -302,10 +302,10 @@
switch (rule->hr_action) {
case RCTL_ACTION_DENY:
should_deny = 1;
- break;
+ continue;
case RCTL_ACTION_LOG:
if (!ppsratecheck(&lasttime, &curtime, 10))
- break;
+ continue;
buf = malloc(RCTL_LOG_BUFSIZE, M_RCTL, M_NOWAIT);
if (buf == NULL) {
@@ -320,25 +320,25 @@
p->p_comm, p->p_ucred->cr_uid);
sbuf_delete(&sb);
free(buf, M_RCTL);
- break;
+ continue;
case RCTL_ACTION_SIGHUP:
rctl_deferred_psignal(p, SIGHUP);
- break;
+ continue;
case RCTL_ACTION_SIGINT:
rctl_deferred_psignal(p, SIGINT);
- break;
+ continue;
case RCTL_ACTION_SIGKILL:
rctl_deferred_psignal(p, SIGKILL);
- break;
+ continue;
case RCTL_ACTION_SIGSEGV:
rctl_deferred_psignal(p, SIGSEGV);
- break;
+ continue;
case RCTL_ACTION_SIGXCPU:
rctl_deferred_psignal(p, SIGXCPU);
- break;
+ continue;
case RCTL_ACTION_SIGXFSZ:
rctl_deferred_psignal(p, SIGXFSZ);
- break;
+ continue;
default:
panic("rctl_enforce_proc: unknown action %d",
rule->hr_action);
More information about the p4-projects
mailing list