• R/O
  • SSH
  • HTTPS

akari: 提交


Commit MetaInfo

修订版680 (tree)
时间2021-12-28 20:01:10
作者kumaneko

Log Message

(empty log message)

更改概述

差异

--- trunk/akari/policy_io.c (revision 679)
+++ trunk/akari/policy_io.c (revision 680)
@@ -4792,9 +4792,10 @@
47924792 return false;
47934793 if (!domain)
47944794 return true;
4795+ if (domain->flags[CCS_DIF_QUOTA_WARNED])
4796+ return false;
47954797 list_for_each_entry_srcu(ptr, &domain->acl_info_list, list, &ccs_ss) {
47964798 u16 perm;
4797- u8 i;
47984799 if (ptr->is_deleted)
47994800 continue;
48004801 switch (ptr->type) {
@@ -4821,20 +4822,15 @@
48214822 default:
48224823 perm = 1;
48234824 }
4824- for (i = 0; i < 16; i++)
4825- if (perm & (1 << i))
4826- count++;
4825+ count += hweight16(perm);
48274826 }
48284827 if (count < ccs_profile(r->profile)->pref[CCS_PREF_MAX_LEARNING_ENTRY])
48294828 return true;
4830- if (!domain->flags[CCS_DIF_QUOTA_WARNED]) {
4831- domain->flags[CCS_DIF_QUOTA_WARNED] = true;
4832- /* r->granted = false; */
4833- ccs_write_log(r, "%s", ccs_dif[CCS_DIF_QUOTA_WARNED]);
4834- printk(KERN_WARNING "WARNING: "
4835- "Domain '%s' has too many ACLs to hold. "
4836- "Stopped learning mode.\n", domain->domainname->name);
4837- }
4829+ domain->flags[CCS_DIF_QUOTA_WARNED] = true;
4830+ /* r->granted = false; */
4831+ ccs_write_log(r, "%s", ccs_dif[CCS_DIF_QUOTA_WARNED]);
4832+ printk(KERN_WARNING "WARNING: Domain '%s' has too many ACLs to hold. "
4833+ "Stopped learning mode.\n", domain->domainname->name);
48384834 return false;
48394835 }
48404836
Show on old repository browser