diff options
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index f86d5c9ce5eb..6e6d4568d548 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -40,9 +40,6 @@ | |||
40 | #include <asm/pgalloc.h> | 40 | #include <asm/pgalloc.h> |
41 | 41 | ||
42 | typedef char *elf_caddr_t; | 42 | typedef char *elf_caddr_t; |
43 | #ifndef elf_addr_t | ||
44 | #define elf_addr_t unsigned long | ||
45 | #endif | ||
46 | 43 | ||
47 | #if 0 | 44 | #if 0 |
48 | #define kdebug(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ ) | 45 | #define kdebug(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ ) |
@@ -709,12 +706,11 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params, | |||
709 | return -ELIBBAD; | 706 | return -ELIBBAD; |
710 | 707 | ||
711 | size = sizeof(*loadmap) + nloads * sizeof(*seg); | 708 | size = sizeof(*loadmap) + nloads * sizeof(*seg); |
712 | loadmap = kmalloc(size, GFP_KERNEL); | 709 | loadmap = kzalloc(size, GFP_KERNEL); |
713 | if (!loadmap) | 710 | if (!loadmap) |
714 | return -ENOMEM; | 711 | return -ENOMEM; |
715 | 712 | ||
716 | params->loadmap = loadmap; | 713 | params->loadmap = loadmap; |
717 | memset(loadmap, 0, size); | ||
718 | 714 | ||
719 | loadmap->version = ELF32_FDPIC_LOADMAP_VERSION; | 715 | loadmap->version = ELF32_FDPIC_LOADMAP_VERSION; |
720 | loadmap->nsegs = nloads; | 716 | loadmap->nsegs = nloads; |
@@ -858,7 +854,7 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params, | |||
858 | 854 | ||
859 | dynamic_error: | 855 | dynamic_error: |
860 | printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n", | 856 | printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n", |
861 | what, file->f_dentry->d_inode->i_ino); | 857 | what, file->f_path.dentry->d_inode->i_ino); |
862 | return -ELIBBAD; | 858 | return -ELIBBAD; |
863 | } | 859 | } |
864 | 860 | ||
@@ -1189,7 +1185,7 @@ static int maydump(struct vm_area_struct *vma) | |||
1189 | 1185 | ||
1190 | /* Dump shared memory only if mapped from an anonymous file. */ | 1186 | /* Dump shared memory only if mapped from an anonymous file. */ |
1191 | if (vma->vm_flags & VM_SHARED) { | 1187 | if (vma->vm_flags & VM_SHARED) { |
1192 | if (vma->vm_file->f_dentry->d_inode->i_nlink == 0) { | 1188 | if (vma->vm_file->f_path.dentry->d_inode->i_nlink == 0) { |
1193 | kdcore("%08lx: %08lx: no (share)", vma->vm_start, vma->vm_flags); | 1189 | kdcore("%08lx: %08lx: no (share)", vma->vm_start, vma->vm_flags); |
1194 | return 1; | 1190 | return 1; |
1195 | } | 1191 | } |
@@ -1325,7 +1321,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus, | |||
1325 | prstatus->pr_pid = p->pid; | 1321 | prstatus->pr_pid = p->pid; |
1326 | prstatus->pr_ppid = p->parent->pid; | 1322 | prstatus->pr_ppid = p->parent->pid; |
1327 | prstatus->pr_pgrp = process_group(p); | 1323 | prstatus->pr_pgrp = process_group(p); |
1328 | prstatus->pr_sid = p->signal->session; | 1324 | prstatus->pr_sid = process_session(p); |
1329 | if (thread_group_leader(p)) { | 1325 | if (thread_group_leader(p)) { |
1330 | /* | 1326 | /* |
1331 | * This is the record for the group leader. Add in the | 1327 | * This is the record for the group leader. Add in the |
@@ -1374,7 +1370,7 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p, | |||
1374 | psinfo->pr_pid = p->pid; | 1370 | psinfo->pr_pid = p->pid; |
1375 | psinfo->pr_ppid = p->parent->pid; | 1371 | psinfo->pr_ppid = p->parent->pid; |
1376 | psinfo->pr_pgrp = process_group(p); | 1372 | psinfo->pr_pgrp = process_group(p); |
1377 | psinfo->pr_sid = p->signal->session; | 1373 | psinfo->pr_sid = process_session(p); |
1378 | 1374 | ||
1379 | i = p->state ? ffz(~p->state) + 1 : 0; | 1375 | i = p->state ? ffz(~p->state) + 1 : 0; |
1380 | psinfo->pr_state = i; | 1376 | psinfo->pr_state = i; |