diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /fs/binfmt_flat.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r-- | fs/binfmt_flat.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index a2796651e756..49566c1687d8 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -87,7 +87,7 @@ static int load_flat_shared_library(int id, struct lib_info *p); | |||
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | static int load_flat_binary(struct linux_binprm *, struct pt_regs * regs); | 89 | static int load_flat_binary(struct linux_binprm *, struct pt_regs * regs); |
90 | static int flat_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); | 90 | static int flat_core_dump(struct coredump_params *cprm); |
91 | 91 | ||
92 | static struct linux_binfmt flat_format = { | 92 | static struct linux_binfmt flat_format = { |
93 | .module = THIS_MODULE, | 93 | .module = THIS_MODULE, |
@@ -102,10 +102,10 @@ static struct linux_binfmt flat_format = { | |||
102 | * Currently only a stub-function. | 102 | * Currently only a stub-function. |
103 | */ | 103 | */ |
104 | 104 | ||
105 | static int flat_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) | 105 | static int flat_core_dump(struct coredump_params *cprm) |
106 | { | 106 | { |
107 | printk("Process %s:%d received signr %d and should have core dumped\n", | 107 | printk("Process %s:%d received signr %d and should have core dumped\n", |
108 | current->comm, current->pid, (int) signr); | 108 | current->comm, current->pid, (int) cprm->signr); |
109 | return(1); | 109 | return(1); |
110 | } | 110 | } |
111 | 111 | ||
@@ -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 | /* |