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

Heiko J Schick schihei at de.ibm.com
Fri Feb 3 07:30:40 PST 2006


Hello Roland,

is it possible that the "force" and write" parameter for the function
get_user_pages are interchanged.

The signature of get_user_pages is:

int get_user_pages(struct task_struct *tsk,
                    struct mm_struct *mm,
                    unsigned long start,
                    int len,
                    int write,    <<<<<
                    int force,    <<<<<
                    struct page **pages,
                    struct vm_area_struct **vmas)

The usage in uverbs_mem.c in function ib_umem_get (line 110) is:

ret = get_user_pages(current,
                      current->mm, cur_base,
                      min_t(int, npages,
                      PAGE_SIZE / sizeof (struct page *)),
                      1,          <<<< IS WRITE ???
                      !write,     <<<< IS FORCE ???
                      page_list,
                      NULL);

If that is the case, I think the problem was not seen, because ib_umem_get
was only used with the "write" flag at the moment.

-- 

Mit freundlichen Gruessen / Kind Regards
Heiko Joerg Schick

----------------------------------------------------------------------
Heiko J Schick
I/O Firmware Development II
Linux InfiniBand Device Drivers

IBM Deutschland Entwicklung GmbH     external:    49-07031-16-0 x4219
Schoenaicher Str. 220                t/l:         120-4129
71032 Boeblingen                     email:       schickhj at de.ibm.com
----------------------------------------------------------------------



More information about the general mailing list