Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332343
b: refs/heads/master
c: 0103bd1
h: refs/heads/master
i:
  332341: adecb10
  332339: 2c3c0c5
  332335: 08af4a2
v: v3
  • Loading branch information
Konstantin Khlebnikov authored and Linus Torvalds committed Oct 9, 2012
1 parent 52490a6 commit de7410c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9714acf8c439688884234dcac2bfc38bb607d38
refs/heads/master: 0103bd16fb90bc741c7a03fd1ea4e8a505abad23
2 changes: 1 addition & 1 deletion trunk/fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
if (always_dump_vma(vma))
goto whole;

if (vma->vm_flags & VM_NODUMP)
if (vma->vm_flags & VM_DONTDUMP)
return 0;

/* Hugetlb memory check */
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ extern unsigned int kobjsize(const void *objp);
#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
#define VM_ARCH_1 0x01000000 /* Architecture-specific flag */
#define VM_NODUMP 0x04000000 /* Do not include in the core dump */
#define VM_DONTDUMP 0x04000000 /* Do not include in the core dump */

#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
#define VM_HUGEPAGE 0x20000000 /* MADV_HUGEPAGE marked this vma */
Expand Down
8 changes: 6 additions & 2 deletions trunk/mm/madvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ static long madvise_behavior(struct vm_area_struct * vma,
new_flags &= ~VM_DONTCOPY;
break;
case MADV_DONTDUMP:
new_flags |= VM_NODUMP;
new_flags |= VM_DONTDUMP;
break;
case MADV_DODUMP:
new_flags &= ~VM_NODUMP;
if (new_flags & VM_SPECIAL) {
error = -EINVAL;
goto out;
}
new_flags &= ~VM_DONTDUMP;
break;
case MADV_MERGEABLE:
case MADV_UNMERGEABLE:
Expand Down

0 comments on commit de7410c

Please sign in to comment.