summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-11 23:16:45 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-11 23:16:45 -0700
commit2039e7b519e24f743a708a5f10bdc95273d1e077 (patch)
treeaf8867ba93a86d4f80b3184789f2eee94172f698 /include/linux
parente2ea83742133d581a0422f1b2d276e690a81f043 (diff)
[PATCH] mremap: vma_relink_file race fix
From: Hugh Dickins <hugh@veritas.com> Subtle point from Rajesh Venkatasubramanian: when mremap's move_vma fails and so rewinds, before moving the file-based ptes back, we must move new_vma before old vma in the i_mmap or i_mmap_shared list, so that when racing against vmtruncate we cannot propagate pages to be truncated back from new_vma into the just cleaned old_vma.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 43335c61e0da..6d6abe8c656e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -543,6 +543,7 @@ extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
struct rb_node **, struct rb_node *);
extern struct vm_area_struct *copy_vma(struct vm_area_struct *,
unsigned long addr, unsigned long len, unsigned long pgoff);
+extern void vma_relink_file(struct vm_area_struct *, struct vm_area_struct *);
extern void exit_mmap(struct mm_struct *);
extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);