diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -195,7 +195,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | |||
195 | * to work from. | 195 | * to work from. |
196 | */ | 196 | */ |
197 | rlim = current->signal->rlim; | 197 | rlim = current->signal->rlim; |
198 | if (size > rlim[RLIMIT_STACK].rlim_cur / 4) { | 198 | if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur) / 4) { |
199 | put_page(page); | 199 | put_page(page); |
200 | return NULL; | 200 | return NULL; |
201 | } | 201 | } |
@@ -579,7 +579,7 @@ int setup_arg_pages(struct linux_binprm *bprm, | |||
579 | 579 | ||
580 | #ifdef CONFIG_STACK_GROWSUP | 580 | #ifdef CONFIG_STACK_GROWSUP |
581 | /* Limit stack size to 1GB */ | 581 | /* Limit stack size to 1GB */ |
582 | stack_base = current->signal->rlim[RLIMIT_STACK].rlim_max; | 582 | stack_base = rlimit_max(RLIMIT_STACK); |
583 | if (stack_base > (1 << 30)) | 583 | if (stack_base > (1 << 30)) |
584 | stack_base = 1 << 30; | 584 | stack_base = 1 << 30; |
585 | 585 | ||
@@ -1535,7 +1535,7 @@ static int format_corename(char *corename, long signr) | |||
1535 | /* core limit size */ | 1535 | /* core limit size */ |
1536 | case 'c': | 1536 | case 'c': |
1537 | rc = snprintf(out_ptr, out_end - out_ptr, | 1537 | rc = snprintf(out_ptr, out_end - out_ptr, |
1538 | "%lu", current->signal->rlim[RLIMIT_CORE].rlim_cur); | 1538 | "%lu", rlimit(RLIMIT_CORE)); |
1539 | if (rc > out_end - out_ptr) | 1539 | if (rc > out_end - out_ptr) |
1540 | goto out; | 1540 | goto out; |
1541 | out_ptr += rc; | 1541 | out_ptr += rc; |
@@ -1800,7 +1800,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) | |||
1800 | struct coredump_params cprm = { | 1800 | struct coredump_params cprm = { |
1801 | .signr = signr, | 1801 | .signr = signr, |
1802 | .regs = regs, | 1802 | .regs = regs, |
1803 | .limit = current->signal->rlim[RLIMIT_CORE].rlim_cur, | 1803 | .limit = rlimit(RLIMIT_CORE), |
1804 | }; | 1804 | }; |
1805 | 1805 | ||
1806 | audit_core_dumps(signr); | 1806 | audit_core_dumps(signr); |