linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: yamamoto@valinux.co.jp (YAMAMOTO Takashi)
To: akpm@linux-foundation.org
Cc: matthltc@us.ibm.com, linux-mm@kvack.org,
	kamezawa.hiroyu@jp.fujitsu.com, minoura@valinux.co.jp
Subject: [PATCH] a fix for procfs-task-exe-symlink.patch
Date: Mon, 17 Mar 2008 09:43:30 +0900 (JST)	[thread overview]
Message-ID: <20080317004330.6D4441E7958@siro.lan> (raw)

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>

             reply	other threads:[~2008-03-17  0:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17  0:43 YAMAMOTO Takashi [this message]
2008-03-17 20:55 ` Matt Helsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080317004330.6D4441E7958@siro.lan \
    --to=yamamoto@valinux.co.jp \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=matthltc@us.ibm.com \
    --cc=minoura@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox