[openib-general] Re: Interchanged parameters for get_user_pages in uverbs_mem.c

Roland Dreier rdreier at cisco.com
Fri Feb 3 08:51:21 PST 2006


    Heiko> Hello Roland, is it possible that the "force" and write"
    Heiko> parameter for the function get_user_pages are interchanged.

No, the parameters are that way intentionally.  The explanation is in
the svn log:

r2642 | roland | 2005-06-16 15:43:04 -0700 (Thu, 16 Jun 2005) | 7 lines

Always ask get_user_pages() for writable pages, but pass force=1 if
the consumer has only asked for read-only pages.  This fixes a problem
registering memory that has just been allocated but not touched yet,
while allowing registration of read-only memory to continue to work.

Signed-off-by: Roland Dreier <roland at topspin.com>

 - R.



More information about the general mailing list