lkml.org 
[lkml]   [2004]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/6] fork vma order
First of six patches against 2.6.5-rc3, cleaning up mremap's move_vma,
and fixing truncation orphan issues raised by Rajesh Venkatasubramanian.
Originally done as part of the anonymous objrmap work on mremap move,
but useful fixes now extracted for mainline. The mremap changes need
some exposure in the -mm tree first, but the first (fork one-liner)
is safe enough to go straight into 2.6.5.

include/linux/mm.h | 3
kernel/fork.c | 2
mm/mmap.c | 70 ++++++++++++++--
mm/mremap.c | 221 +++++++++++++++++++----------------------------------
mm/rmap.c | 3
5 files changed, 149 insertions(+), 150 deletions(-)

[PATCH] 1/6 fork vma order

From Rajesh Venkatasubramanian: despite the comment that child vma
should be inserted just after parent vma, 2.5.6 did exactly the reverse:
thus a racing vmtruncate may free the child's ptes, then advance to the
parent, and meanwhile copy_page_range has propagated more ptes from the
parent to the child, leaving file pages still mapped after truncation.

--- 2.6.5-rc3/kernel/fork.c 2004-03-11 01:56:07.000000000 +0000
+++ mremap1/kernel/fork.c 2004-03-30 21:24:25.839880544 +0100
@@ -322,7 +322,7 @@ static inline int dup_mmap(struct mm_str

/* insert tmp into the share list, just after mpnt */
down(&file->f_mapping->i_shared_sem);
- list_add_tail(&tmp->shared, &mpnt->shared);
+ list_add(&tmp->shared, &mpnt->shared);
up(&file->f_mapping->i_shared_sem);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.038 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site