Skip to content

Commit 0408b04

Browse files
committed
kernel/acct.c: use dedicated helper to access rlimit values
JIRA: https://issues.redhat.com/browse/RHEL-83160 commit 3c91dda Author: Yang Yang <yang.yang29@zte.com.cn> Date: Tue, 7 Sep 2021 19:58:18 -0700 kernel/acct.c: use dedicated helper to access rlimit values Use rlimit() helper instead of manually writing whole chain from task to rlimit value. See patch "posix-cpu-timers: Use dedicated helper to access rlimit values". Link: https://lkml.kernel.org/r/20210728030822.524789-1-yang.yang29@zte.com.cn Signed-off-by: Yang Yang <yang.yang29@zte.com.cn> Reported-by: Zeal Robot <zealci@zte.com.cn> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: sh_def@163.com <sh_def@163.com> Cc: Yang Yang <yang.yang29@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Waiman Long <longman@redhat.com>
1 parent 818e414 commit 0408b04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/acct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static void do_acct_process(struct bsd_acct_struct *acct)
477477
/*
478478
* Accounting records are not subject to resource limits.
479479
*/
480-
flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
480+
flim = rlimit(RLIMIT_FSIZE);
481481
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
482482
/* Perform file operations on behalf of whoever enabled accounting */
483483
orig_cred = override_creds(file->f_cred);

0 commit comments

Comments
 (0)