Lines 112-118
Link Here
|
112 |
+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__) |
112 |
+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__) |
113 |
+#endif /* CONFIG_MMU */ |
113 |
+#endif /* CONFIG_MMU */ |
114 |
+ |
114 |
+ |
115 |
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
115 |
extern ssize_t access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, size_t len, int write); |
116 |
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, |
116 |
extern ssize_t access_remote_vm(struct mm_struct *mm, unsigned long addr, |
117 |
void *buf, int len, int write); |
117 |
void *buf, size_t len, int write); |
118 |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h |
118 |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h |
Lines 140-151
Link Here
|
140 |
--- a/kernel/fork.c |
140 |
--- a/kernel/fork.c |
141 |
+++ b/kernel/fork.c |
141 |
+++ b/kernel/fork.c |
142 |
@@ -412,7 +412,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) |
142 |
@@ -412,7 +412,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) |
143 |
struct inode *inode = file_inode(file); |
143 |
struct inode *inode = file_inode(file); |
144 |
struct address_space *mapping = file->f_mapping; |
144 |
struct address_space *mapping = file->f_mapping; |
145 |
|
145 |
|
146 |
- get_file(file); |
146 |
- get_file(file); |
147 |
+ vma_get_file(tmp); |
147 |
+ vma_get_file(tmp); |
148 |
if (tmp->vm_flags & VM_DENYWRITE) |
148 |
if (tmp->vm_flags & VM_DENYWRITE) |
149 |
atomic_dec(&inode->i_writecount); |
149 |
atomic_dec(&inode->i_writecount); |
150 |
mutex_lock(&mapping->i_mmap_mutex); |
150 |
mutex_lock(&mapping->i_mmap_mutex); |
151 |
diff --git a/mm/Makefile b/mm/Makefile |
151 |
diff --git a/mm/Makefile b/mm/Makefile |
Lines 291-302
Link Here
|
291 |
|
291 |
|
292 |
if (new->vm_ops && new->vm_ops->open) |
292 |
if (new->vm_ops && new->vm_ops->open) |
293 |
new->vm_ops->open(new); |
293 |
new->vm_ops->open(new); |
294 |
@@ -2448,7 +2448,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, |
294 |
@@ -2448,6 +2448,6 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, |
295 |
if (new->vm_ops && new->vm_ops->close) |
295 |
if (new->vm_ops && new->vm_ops->close) |
296 |
new->vm_ops->close(new); |
296 |
new->vm_ops->close(new); |
297 |
if (new->vm_file) |
297 |
if (new->vm_file) |
298 |
- fput(new->vm_file); |
298 |
- fput(new->vm_file); |
299 |
+ vma_fput(new); |
299 |
+ vma_fput(new); |
300 |
unlink_anon_vmas(new); |
|
|
301 |
out_free_mpol: |
300 |
out_free_mpol: |
302 |
mpol_put(vma_policy(new)); |
301 |
mpol_put(vma_policy(new)); |