Date: Tue, 26 Jan 2016 11:28:55 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294792 - head/sys/kern Message-ID: <201601261128.u0QBStRS091467@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Tue Jan 26 11:28:55 2016 New Revision: 294792 URL: https://svnweb.freebsd.org/changeset/base/294792 Log: Fix the way RCTL handles rules' rrl_exceeded on credenials change. Because of what this variable does, it was probably harmless - but still incorrect. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_rctl.c Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Tue Jan 26 10:24:18 2016 (r294791) +++ head/sys/kern/kern_rctl.c Tue Jan 26 11:28:55 2016 (r294792) @@ -1745,6 +1745,7 @@ again: for (i = 0; i < rulecnt; i++) { newlink = uma_zalloc(rctl_rule_link_zone, M_WAITOK); newlink->rrl_rule = NULL; + newlink->rrl_exceeded = 0; LIST_INSERT_HEAD(&newrules, newlink, rrl_next); } @@ -1761,6 +1762,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; } @@ -1771,6 +1773,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; } @@ -1780,6 +1783,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; } @@ -1789,6 +1793,7 @@ again: goto goaround; rctl_rule_acquire(link->rrl_rule); newlink->rrl_rule = link->rrl_rule; + newlink->rrl_exceeded = link->rrl_exceeded; newlink = LIST_NEXT(newlink, rrl_next); rulecnt--; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601261128.u0QBStRS091467>