linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] a fix for procfs-task-exe-symlink.patch
@ 2008-03-17  0:43 YAMAMOTO Takashi
  2008-03-17 20:55 ` Matt Helsley
  0 siblings, 1 reply; 2+ messages in thread
From: YAMAMOTO Takashi @ 2008-03-17  0:43 UTC (permalink / raw)
  To: akpm; +Cc: matthltc, linux-mm, kamezawa.hiroyu, minoura

it seems that procfs-task-exe-symlink.patch broke the case of
dup_mmap failure.  ie. mm->exe_file is copied by memcpy from oldmm
and then be fput'ed by mmput/set_mm_exe_file.

YAMAMOTO Takashi


Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
---

--- linux-2.6.25-rc3-mm1/kernel/fork.c.BACKUP	2008-03-05 15:45:50.000000000 +0900
+++ linux-2.6.25-rc3-mm1/kernel/fork.c	2008-03-17 09:17:39.000000000 +0900
@@ -523,11 +526,12 @@ static struct mm_struct *dup_mm(struct t
 	if (init_new_context(tsk, mm))
 		goto fail_nocontext;
 
+	dup_mm_exe_file(oldmm, mm);
+
 	err = dup_mmap(mm, oldmm);
 	if (err)
 		goto free_pt;
 
-	dup_mm_exe_file(oldmm, mm);
 	mm->hiwater_rss = get_mm_rss(mm);
 	mm->hiwater_vm = mm->total_vm;
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-17 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-17  0:43 [PATCH] a fix for procfs-task-exe-symlink.patch YAMAMOTO Takashi
2008-03-17 20:55 ` Matt Helsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).