On Wed, 1 Dec 1999, Ingo Molnar wrote:

> the problem is generic_file_write() locking the page while generating a
> page fault (to the same page).

OK, folks. Proposed fix:
        a) new function: pin_user_page(address); finds a page, faults it
in, does get_page() and returns the struct page *.
        b) generic_file_write() doing it on consequent pages of user data
_before_ calling write_one_page() and releasing them once they are not
needed (we can have at most 2 at any moment).
        c) block_write_partial_page() and friends use memcpy() instead of
copy_from_user(). verify_area() is done by generic_file_write().

        Comments? The new rule being that we should never do
copy_from_user() while holding lock on any page and should pin the source
while we don't hold any locks.

Reply via email to