From: John Hubbard <jhubb...@nvidia.com> For pages that were retained via get_user_pages*(), release those pages via the new put_user_page*() routines, instead of via put_page() or release_pages().
This is part a tree-wide conversion, as described in commit fc1d8e7cca2d ("mm: introduce put_user_page*(), placeholder versions"). Cc: Eric Anholt <e...@anholt.net> Cc: Stefan Wahren <stefan.wah...@i2se.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Mihaela Muraru <mihaela.murar...@gmail.com> Cc: Suniel Mahesh <suni...@techveda.org> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Sidong Yang <realwa...@gmail.com> Cc: Kishore KP <kishor...@techveda.org> Cc: linux-rpi-ker...@lists.infradead.org Cc: linux-arm-ker...@lists.infradead.org Cc: de...@driverdev.osuosl.org Signed-off-by: John Hubbard <jhubb...@nvidia.com> --- .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index 61c69f353cdb..ec92b4c50e95 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -336,10 +336,7 @@ cleanup_pagelistinfo(struct vchiq_pagelist_info *pagelistinfo) } if (pagelistinfo->pages_need_release) { - unsigned int i; - - for (i = 0; i < pagelistinfo->num_pages; i++) - put_page(pagelistinfo->pages[i]); + put_user_pages(pagelistinfo->pages, pagelistinfo->num_pages); } dma_free_coherent(g_dev, pagelistinfo->pagelist_buffer_size, @@ -454,10 +451,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type) __func__, actual_pages, num_pages); /* This is probably due to the process being killed */ - while (actual_pages > 0) { - actual_pages--; - put_page(pages[actual_pages]); - } + put_user_pages(pages, actual_pages); cleanup_pagelistinfo(pagelistinfo); return NULL; } -- 2.22.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx