Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Yang Yang and committed by
Linus Torvalds
3c91dda9 18821693

+1 -1
+1 -1
kernel/acct.c
··· 478 478 /* 479 479 * Accounting records are not subject to resource limits. 480 480 */ 481 - flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; 481 + flim = rlimit(RLIMIT_FSIZE); 482 482 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; 483 483 /* Perform file operations on behalf of whoever enabled accounting */ 484 484 orig_cred = override_creds(file->f_cred);