Date: Fri, 14 Jan 2011 20:20:01 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 187812 for review Message-ID: <201101142020.p0EKK1V1012226@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@187812?ac=10 Change 187812 by trasz@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101142020.p0EKK1V1012226>