lkml.org 
[lkml]   [2004]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: deadlocks caused by ext3/reiser dirty_inode calls during do_mmap_pgoff
From
Date
On Mon, 2004-06-21 at 20:13, Andrew Morton wrote:

> It's super-improbable because we fault the source page in by hand in
> generic_file_aio_write_nolock() via fault_in_pages_readable(). Of course,
> that prefaulting isn't 100% reliable either, because the VM can come in and
> steal the page (or at least unmap its pte) before we get to doing the copy.
>
> I think we can fix both problems by changing filemap_copy_from_user() and
> filemap_copy_from_user_iovec() to not fall back to kmap() - just fail the
> copy in some way if the atomic copy failed. Then, in
> generic_file_aio_write_nolock(), do a zero-length ->commit_write(),
> put_page(), then go back and retry the whole thing, starting with
> fault_in_pages_readable().

Oh, just realized this will break our data=ordered setup. prepare_write
is going to do things like allocating blocks in the file etc etc. If we
close the transaction via commit_write(0 size) and crash, we'll leak.

We might need to do prefault + pin on the user pages.

-chris


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

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