[lkml]   [2003]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Race between vmtruncate and mapped areas?

--On Tuesday, May 13, 2003 16:11:39 -0700 William Lee Irwin III
<> wrote:

> Okay, what's stopping filemap_nopage() from fetching the page from
> pagecache after one of the mm->mmap_sem's is dropped but before
> truncate_inode_pages() removes the page? The fault path is only locked
> out for one mm during one part of the operation. I can see taking
> ->i_sem in do_no_page() fixing it, but not ->mmap_sem in vmtruncate()
> (but of course that's _far_ too heavy-handed to merge at all).

mmap_sem is held for read across the entire fault, so by the time
vmtruncate_list() can call zap_page_range() the page has been instantiated
in the page table and will get removed.


Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059 T/L 678-3059

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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