Skip to content

Commit fd8ec4d

Browse files
author
Al Viro
committed
hfi1: get rid of pointless access_ok()
pin_user_pages_fast() doesn't need that from its caller. NB: only reachable from ->ioctl(), and only under USER_DS Signed-off-by: Al Viro <[email protected]>
1 parent fe6bb59 commit fd8ec4d

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/infiniband/hw/hfi1/user_exp_rcv.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,6 @@ static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf)
206206
return -EINVAL;
207207
}
208208

209-
/* Verify that access is OK for the user buffer */
210-
if (!access_ok((void __user *)vaddr,
211-
npages * PAGE_SIZE)) {
212-
dd_dev_err(dd, "Fail vaddr %p, %u pages, !access_ok\n",
213-
(void *)vaddr, npages);
214-
return -EFAULT;
215-
}
216209
/* Allocate the array of struct page pointers needed for pinning */
217210
pages = kcalloc(npages, sizeof(*pages), GFP_KERNEL);
218211
if (!pages)

0 commit comments

Comments
 (0)