All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: walken@google.com, hughd@google.com, jslaby@suse.cz,
	levinsasha928@gmail.com, mm-commits@vger.kernel.org
Subject: [merged] mm-anon-rmap-in-mremap-set-the-new-vmas-position-before-anon_vma_clone.patch removed from -mm tree
Date: Tue, 09 Oct 2012 11:10:59 -0700	[thread overview]
Message-ID: <20121009181059.C75421E0043@wpzn4.hot.corp.google.com> (raw)


The patch titled
     Subject: mm anon rmap: in mremap, set the new vma's position before anon_vma_clone()
has been removed from the -mm tree.  Its filename was
     mm-anon-rmap-in-mremap-set-the-new-vmas-position-before-anon_vma_clone.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Michel Lespinasse <walken@google.com>
Subject: mm anon rmap: in mremap, set the new vma's position before anon_vma_clone()

anon_vma_clone() expects new_vma->vm_{start,end,pgoff} to be correctly set
so that the new vma can be indexed on the anon interval tree.

copy_vma() was failing to do that, which broke mremap().

Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Hugh Dickins <hughd@google.com>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmap.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -puN mm/mmap.c~mm-anon-rmap-in-mremap-set-the-new-vmas-position-before-anon_vma_clone mm/mmap.c
--- a/mm/mmap.c~mm-anon-rmap-in-mremap-set-the-new-vmas-position-before-anon_vma_clone
+++ a/mm/mmap.c
@@ -2419,16 +2419,16 @@ struct vm_area_struct *copy_vma(struct v
 		new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
 		if (new_vma) {
 			*new_vma = *vma;
+			new_vma->vm_start = addr;
+			new_vma->vm_end = addr + len;
+			new_vma->vm_pgoff = pgoff;
 			pol = mpol_dup(vma_policy(vma));
 			if (IS_ERR(pol))
 				goto out_free_vma;
+			vma_set_policy(new_vma, pol);
 			INIT_LIST_HEAD(&new_vma->anon_vma_chain);
 			if (anon_vma_clone(new_vma, vma))
 				goto out_free_mempol;
-			vma_set_policy(new_vma, pol);
-			new_vma->vm_start = addr;
-			new_vma->vm_end = addr + len;
-			new_vma->vm_pgoff = pgoff;
 			if (new_vma->vm_file)
 				get_file(new_vma->vm_file);
 			if (new_vma->vm_ops && new_vma->vm_ops->open)
_

Patches currently in -mm which might be from walken@google.com are

origin.patch
prio_tree-remove-fix.patch


                 reply	other threads:[~2012-10-09 18:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20121009181059.C75421E0043@wpzn4.hot.corp.google.com \
    --to=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=jslaby@suse.cz \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=walken@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.