diff options
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r-- | fs/binfmt_flat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index d4a00ea1054c..49566c1687d8 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -355,7 +355,7 @@ calc_reloc(unsigned long r, struct lib_info *p, int curid, int internalp) | |||
355 | 355 | ||
356 | if (!flat_reloc_valid(r, start_brk - start_data + text_len)) { | 356 | if (!flat_reloc_valid(r, start_brk - start_data + text_len)) { |
357 | printk("BINFMT_FLAT: reloc outside program 0x%x (0 - 0x%x/0x%x)", | 357 | printk("BINFMT_FLAT: reloc outside program 0x%x (0 - 0x%x/0x%x)", |
358 | (int) r,(int)(start_brk-start_code),(int)text_len); | 358 | (int) r,(int)(start_brk-start_data+text_len),(int)text_len); |
359 | goto failed; | 359 | goto failed; |
360 | } | 360 | } |
361 | 361 | ||
@@ -501,7 +501,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
501 | * size limits imposed on them by creating programs with large | 501 | * size limits imposed on them by creating programs with large |
502 | * arrays in the data or bss. | 502 | * arrays in the data or bss. |
503 | */ | 503 | */ |
504 | rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; | 504 | rlim = rlimit(RLIMIT_DATA); |
505 | if (rlim >= RLIM_INFINITY) | 505 | if (rlim >= RLIM_INFINITY) |
506 | rlim = ~0; | 506 | rlim = ~0; |
507 | if (data_len + bss_len > rlim) { | 507 | if (data_len + bss_len > rlim) { |
@@ -519,6 +519,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
519 | 519 | ||
520 | /* OK, This is the point of no return */ | 520 | /* OK, This is the point of no return */ |
521 | set_personality(PER_LINUX_32BIT); | 521 | set_personality(PER_LINUX_32BIT); |
522 | setup_new_exec(bprm); | ||
522 | } | 523 | } |
523 | 524 | ||
524 | /* | 525 | /* |