Re: [PATCH] fix page leak during core dump

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hugh Dickins
Date: Friday, March 30, 2007 - 4:06 pm

On Fri, 30 Mar 2007, Andrew Morton wrote:

Oooh, yes please.


No, I think that's wrong: whereas the binfmt_elf one did its
page_cache_release down below at the bottom of the block, this
version does it in each subblock, so there you're removing the
dump_seek success one.  Can't we preserve that beauteous macro
here and just do...

--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1480,8 +1480,8 @@ static int elf_fdpic_dump_segments(struc
 				DUMP_SEEK(file->f_pos + PAGE_SIZE);
 			}
 			else if (page == ZERO_PAGE(addr)) {
-				DUMP_SEEK(file->f_pos + PAGE_SIZE);
 				page_cache_release(page);
+				DUMP_SEEK(file->f_pos + PAGE_SIZE);
 			}
 			else {
 				void *kaddr;
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fix page leak during core dump, Brian Pomerantz, (Thu Mar 29, 1:39 pm)
Re: [PATCH] fix page leak during core dump, Andrew Morton, (Fri Mar 30, 1:43 pm)
Re: [PATCH] fix page leak during core dump, Hugh Dickins, (Fri Mar 30, 3:01 pm)
Re: [PATCH] fix page leak during core dump, Andrew Morton, (Fri Mar 30, 3:13 pm)
Re: [PATCH] fix page leak during core dump, Hugh Dickins, (Fri Mar 30, 4:06 pm)
Re: [PATCH] fix page leak during core dump , David Howells, (Sat Mar 31, 5:57 am)
Re: [PATCH] fix page leak during core dump , David Howells, (Sat Mar 31, 5:59 am)