lkml.org 
[lkml]   [1999]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [CFT][PATCH] block_write_*_buffer rewrite


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.


-
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:55    [from the cache]
©2003-2011 Jasper Spaans