Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 266431 Details for
Bug 357657
Fix possible cause of a page_mapped BUG in mm/mremap.c
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
possible-cause-of-a-page_mapped-bug fix (upstream)
mm-fix-possible-cause-of-a-page_mapped-bug.patch (text/plain), 1.62 KB, created by
RumpletonBongworth
on 2011-03-19 04:33:23 UTC
(
hide
)
Description:
possible-cause-of-a-page_mapped-bug fix (upstream)
Filename:
MIME Type:
Creator:
RumpletonBongworth
Created:
2011-03-19 04:33:23 UTC
Size:
1.62 KB
patch
obsolete
>From a3e8cc643d22d2c8ed36b9be7d9c9ca21efcf7f7 Mon Sep 17 00:00:00 2001 >From: Hugh Dickins <hughd@google.com> >Date: Wed, 23 Feb 2011 21:39:49 -0800 >Subject: [PATCH] mm: fix possible cause of a page_mapped BUG > >Robert Swiecki reported a BUG_ON(page_mapped) from a fuzzer, punching >a hole with madvise(,, MADV_REMOVE). That path is under mutex, and >cannot be explained by lack of serialization in unmap_mapping_range(). > >Reviewing the code, I found one place where vm_truncate_count handling >should have been updated, when I switched at the last minute from one >way of managing the restart_addr to another: mremap move changes the >virtual addresses, so it ought to adjust the restart_addr. > >But rather than exporting the notion of restart_addr from memory.c, or >converting to restart_pgoff throughout, simply reset vm_truncate_count >to 0 to force a rescan if mremap move races with preempted truncation. > >We have no confirmation that this fixes Robert's BUG, >but it is a fix that's worth making anyway. > >Signed-off-by: Hugh Dickins <hughd@google.com> >Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> >--- > mm/mremap.c | 4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > >diff --git a/mm/mremap.c b/mm/mremap.c >index 9925b63..1de98d4 100644 >--- a/mm/mremap.c >+++ b/mm/mremap.c >@@ -94,9 +94,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, > */ > mapping = vma->vm_file->f_mapping; > spin_lock(&mapping->i_mmap_lock); >- if (new_vma->vm_truncate_count && >- new_vma->vm_truncate_count != vma->vm_truncate_count) >- new_vma->vm_truncate_count = 0; >+ new_vma->vm_truncate_count = 0; > } > > /* >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 357657
:
266427
|
266429
| 266431 |
266435