aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf_fdpic.c
diff options
context:
space:
mode:
authorBrian Pomerantz <bapper@piratehaven.org>2007-04-02 02:49:41 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-02 13:06:08 -0400
commit03221702608c60b470fc86a23bdf4bc30e5bd59f (patch)
treeab83782a3ece940838604ac8a44676e9734b6909 /fs/binfmt_elf_fdpic.c
parent2400ff77e7025bf6ffb71afdcbfbdd9aa47dfc36 (diff)
[PATCH] fix page leak during core dump
When the dump cannot occur most likely because of a full file system and the page to be written is the zero page, the call to page_cache_release() is missed. Signed-off-by: Brian Pomerantz <bapper@mvista.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: David Howells <dhowells@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r--fs/binfmt_elf_fdpic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 47d6d49d1fb9..f3ddca4a387b 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1480,8 +1480,8 @@ static int elf_fdpic_dump_segments(struct file *file, struct mm_struct *mm,
1480 DUMP_SEEK(file->f_pos + PAGE_SIZE); 1480 DUMP_SEEK(file->f_pos + PAGE_SIZE);
1481 } 1481 }
1482 else if (page == ZERO_PAGE(addr)) { 1482 else if (page == ZERO_PAGE(addr)) {
1483 DUMP_SEEK(file->f_pos + PAGE_SIZE);
1484 page_cache_release(page); 1483 page_cache_release(page);
1484 DUMP_SEEK(file->f_pos + PAGE_SIZE);
1485 } 1485 }
1486 else { 1486 else {
1487 void *kaddr; 1487 void *kaddr;