diff options
author | Vladimir V. Saveliev <vs@namesys.com> | 2006-06-27 02:53:57 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-07-24 20:35:25 -0700 |
commit | b5e475eb0506f525abd38782e40c4acd0b280f28 (patch) | |
tree | 5a85aaa3f6d2ffe9ba9f0f172a833564dc297fb4 /Kbuild | |
parent | ba4532fa45b99a866d253877372f086503a944c6 (diff) |
generic_file_buffered_write(): deadlock on vectored write
generic_file_buffered_write() prefaults in user pages in order to avoid
deadlock on copying from the same page as write goes to.
However, it looks like there is a problem when write is vectored:
fault_in_pages_readable brings in current segment or its part (maxlen).
OTOH, filemap_copy_from_user_iovec is called to copy number of bytes
(bytes) which may exceed current segment, so filemap_copy_from_user_iovec
switches to the next segment which is not brought in yet. Pagefault is
generated. That causes the deadlock if pagefault is for the same page
write goes to: page being written is locked and not uptodate, pagefault
will deadlock trying to lock locked page.
[akpm@osdl.org: somewhat rewritten]
Cc: Neil Brown <neilb@suse.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions