lkml.org 
[lkml]   [1999]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfilemap_nopage() tries to copy to page 0, eek.
Hi,

(Apologies in advance if you already know about this)

I've just been chasing down the problem with writes to mmap()d areas hanging,
and it turns out that filemap_nopage() will try to clobber page 0 if the
page isn't found in the page cache and no_share is true:

no_cached_page:
.
.
.
/*
* Now it's ours and locked, we can do initial IO to it:
*/
new_page = 0;
page_not_uptodate:
error = inode->i_op->readpage(file, page);
if (!error) {
wait_on_page(page);
if (PageError(page))
goto page_read_error;
goto success;
}
success:
old_page = page_address(page);
if (!no_share) {
...
}
/*
* No sharing ... copy to the new page.
*/
if (!new_page)
printk(KERN_CRIT "filemap_nopage(): erk, new_page == 0\n");
copy_page(new_page, old_page);
I don't claim to understand (yet) what the fix is; I'm also not on clear why
the page fault handler just tries to re-enter itself, ultimately deadlocking
on current->mm->mmap_sem -- does it show that I'm /way/ out of my depth
here? ;-)

--
If breastfeeding a pig is sickening to you, what the hell are you
doing on usenet? -- Aimee, on rec.music.tori-amos

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

\
 
 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2011 Jasper Spaans