summaryrefslogtreecommitdiff
path: root/drivers/media/pci/ivtv/ivtvfb.c
diff options
context:
space:
mode:
authorJohn Hubbard <jhubbard@nvidia.com>2020-06-02 07:48:30 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-02 20:59:08 +0300
commite792031019bdc3f1eb5cac5a4171f7ffb8586c1b (patch)
treee161c580e6bdbbbc9153efc3f5e367305a1ccca5 /drivers/media/pci/ivtv/ivtvfb.c
parent91429023342789a89f4b6ae95b47a7df71ab6d95 (diff)
downloadlinux-e792031019bdc3f1eb5cac5a4171f7ffb8586c1b.tar.xz
ivtv: convert get_user_pages() --> pin_user_pages()
This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Walls <awalls@md.metrocast.net> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Link: http://lkml.kernel.org/r/20200518012157.1178336-3-jhubbard@nvidia.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media/pci/ivtv/ivtvfb.c')
-rw-r--r--drivers/media/pci/ivtv/ivtvfb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c
index 0c2859844081..e2d56dca5be4 100644
--- a/drivers/media/pci/ivtv/ivtvfb.c
+++ b/drivers/media/pci/ivtv/ivtvfb.c
@@ -281,10 +281,10 @@ static int ivtvfb_prep_dec_dma_to_device(struct ivtv *itv,
/* Map User DMA */
if (ivtv_udma_setup(itv, ivtv_dest_addr, userbuf, size_in_bytes) <= 0) {
mutex_unlock(&itv->udma.lock);
- IVTVFB_WARN("ivtvfb_prep_dec_dma_to_device, Error with get_user_pages: %d bytes, %d pages returned\n",
+ IVTVFB_WARN("ivtvfb_prep_dec_dma_to_device, Error with pin_user_pages: %d bytes, %d pages returned\n",
size_in_bytes, itv->udma.page_count);
- /* get_user_pages must have failed completely */
+ /* pin_user_pages must have failed completely */
return -EIO;
}