diff options
author | trasz <trasz@FreeBSD.org> | 2016-01-26 11:28:55 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2016-01-26 11:28:55 +0000 |
commit | 8e0224f2c9a71228d1737b8467e708d93bbda509 (patch) | |
tree | 6a7b0e99a734ee3a771fb4897d7e356588f4539d /sys/kern | |
parent | f628f78b7413eaed11b2da38906dd013dedf5385 (diff) | |
download | FreeBSD-src-8e0224f2c9a71228d1737b8467e708d93bbda509.zip FreeBSD-src-8e0224f2c9a71228d1737b8467e708d93bbda509.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_rctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index ee3b385..b0d3fd6 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -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--; } |