projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'fscache-fixes-20140917' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
fs
/
binfmt_elf.c
diff --git
a/fs/binfmt_elf.c
b/fs/binfmt_elf.c
index aa3cb626671e4a573a4882580cc3d834664751f1..3892c1a2324143498f3e62fc171a0f5cdc6c44c9 100644
(file)
--- a/
fs/binfmt_elf.c
+++ b/
fs/binfmt_elf.c
@@
-1108,6
+1108,14
@@
static bool always_dump_vma(struct vm_area_struct *vma)
/* Any vsyscall mappings? */
if (vma == get_gate_vma(vma->vm_mm))
return true;
/* Any vsyscall mappings? */
if (vma == get_gate_vma(vma->vm_mm))
return true;
+
+ /*
+ * Assume that all vmas with a .name op should always be dumped.
+ * If this changes, a new vm_ops field can easily be added.
+ */
+ if (vma->vm_ops && vma->vm_ops->name && vma->vm_ops->name(vma))
+ return true;
+
/*
* arch_vma_name() returns non-NULL for special architecture mappings,
* such as vDSO sections.
/*
* arch_vma_name() returns non-NULL for special architecture mappings,
* such as vDSO sections.
@@
-1686,7
+1694,7
@@
static size_t get_note_info_size(struct elf_note_info *info)
static int write_note_info(struct elf_note_info *info,
struct coredump_params *cprm)
{
static int write_note_info(struct elf_note_info *info,
struct coredump_params *cprm)
{
- bool first =
1
;
+ bool first =
true
;
struct elf_thread_core_info *t = info->thread;
do {
struct elf_thread_core_info *t = info->thread;
do {
@@
-1710,7
+1718,7
@@
static int write_note_info(struct elf_note_info *info,
!writenote(&t->notes[i], cprm))
return 0;
!writenote(&t->notes[i], cprm))
return 0;
- first =
0
;
+ first =
false
;
t = t->next;
} while (t);
t = t->next;
} while (t);