Messages in this thread | | | Date | Thu, 29 Jun 2006 11:24:07 -0700 | From | Chris Wright <> | Subject | Re: [stable] [PATCH 25/25] generic_file_buffered_write(): deadlock on vectored write |
| |
* Chris Wright (chrisw@sous-sol.org) wrote: > From: Vladimir V. Saveliev <vs@namesys.com> > > 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.
This is dropped for now, as it causes another problem with 0 length iovecs. Andrew has written a fix and once it's baked in Linus' tree for a bit we can take back this one plus the fix.
thanks, -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/
| |