Skip to content

Commit

Permalink
OFED: Fix a few places that use get_user_pages.
Browse files Browse the repository at this point in the history
The first argument needs to be a void * now rather than an integer.

cheribuild doesn't notice this for amd64 since it disables OFED even
for non-cheri platforms.
  • Loading branch information
bsdjhb committed Jun 21, 2023
1 parent ee72a9e commit 7527b29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sys/dev/mthca/mthca_memfree.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ int mthca_map_user_db(struct mthca_dev *dev, struct mthca_uar *uar,
goto out;
}

ret = get_user_pages(uaddr & PAGE_MASK, 1, FOLL_WRITE, pages, NULL);
ret = get_user_pages((void *)(uintptr_t)(uaddr & PAGE_MASK), 1, FOLL_WRITE, pages, NULL);
if (ret < 0)
goto out;

Expand Down
2 changes: 1 addition & 1 deletion sys/ofed/drivers/infiniband/core/ib_umem.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
sg_list_start = umem->sg_head.sgl;

while (npages) {
ret = get_user_pages(cur_base,
ret = get_user_pages((void *)cur_base,
min_t(unsigned long, npages,
PAGE_SIZE / sizeof (struct page *)),
gup_flags, page_list, vma_list);
Expand Down

0 comments on commit 7527b29

Please sign in to comment.