* [PATCH 0/7] get_user_pages() cleanup
@ 2015-10-06 9:24 Jan Kara
2015-10-06 9:24 ` [PATCH 2/7] ia64: Use get_user_pages_fast() in err_inject.c Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2015-10-06 9:24 UTC (permalink / raw)
To: linux-mm
Cc: Jan Kara, Jesper Nilsson, linux-cris-kernel, Mikael Starvik,
linux-ia64, Tony Luck, David Airlie, dri-devel, Timur Tabi,
linux-rdma, Roland Dreier, Daniel Vetter, Andy Walls, linux-media,
Mauro Carvalho Chehab
From: Jan Kara <jack@suse.cz>
Hello,
Now when the usage of get_user_pages() in media drivers got cleaned up, here
comes a series which removes knowledge about mmap_sem from a couple of other
drivers. Patches are trivial and standalone but please check, they are only
compile tested. If you are OK with them, either take them through your
respective trees or ack them and I can take care of pushing them to Linus
(probably through mm tree). Thanks.
After these patches there are some 12 call sites of get_user_pages() outside of
core code (mostly infiniband and RDMA). So we are slowly getting to the goal of
removing knowledge about page fault locking from drivers which will
consequently allow us to change the locking rules with reasonable effort.
Honza
CC: Jesper Nilsson <jesper.nilsson@axis.com>
CC: linux-cris-kernel@axis.com
CC: Mikael Starvik <starvik@axis.com>
CC: linux-ia64@vger.kernel.org
CC: Tony Luck <tony.luck@intel.com>
CC: David Airlie <airlied@linux.ie>
CC: dri-devel@lists.freedesktop.org
CC: Timur Tabi <timur@freescale.com>
CC: linux-rdma@vger.kernel.org
CC: Roland Dreier <roland@kernel.org>
CC: Daniel Vetter <daniel.vetter@intel.com>
CC: David Airlie <airlied@linux.ie>
CC: dri-devel@lists.freedesktop.org
CC: Andy Walls <awalls@md.metrocast.net>
CC: linux-media@vger.kernel.org
CC: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/7] ia64: Use get_user_pages_fast() in err_inject.c
2015-10-06 9:24 [PATCH 0/7] get_user_pages() cleanup Jan Kara
@ 2015-10-06 9:24 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2015-10-06 9:24 UTC (permalink / raw)
To: linux-mm; +Cc: Jan Kara, Tony Luck, linux-ia64
From: Jan Kara <jack@suse.cz>
Convert get_user_pages() call to get_user_pages_fast(). This actually
fixes an apparent bug where get_user_pages() has been called without
mmap_sem for an arbitrary user-provided address.
CC: Tony Luck <tony.luck@intel.com>
CC: linux-ia64@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
arch/ia64/kernel/err_inject.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c
index 0c161ed6d18e..1fc8995bd8b8 100644
--- a/arch/ia64/kernel/err_inject.c
+++ b/arch/ia64/kernel/err_inject.c
@@ -142,8 +142,7 @@ store_virtual_to_phys(struct device *dev, struct device_attribute *attr,
u64 virt_addr=simple_strtoull(buf, NULL, 16);
int ret;
- ret = get_user_pages(current, current->mm, virt_addr,
- 1, VM_READ, 0, NULL, NULL);
+ ret = get_user_pages_fast(virt_addr, 1, VM_READ, NULL);
if (ret<=0) {
#ifdef ERR_INJ_DEBUG
printk("Virtual address %lx is not existing.\n",virt_addr);
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-06 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 9:24 [PATCH 0/7] get_user_pages() cleanup Jan Kara
2015-10-06 9:24 ` [PATCH 2/7] ia64: Use get_user_pages_fast() in err_inject.c Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox