summaryrefslogtreecommitdiff
path: root/arch/ia64
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2018-01-22 09:21:37 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:50:34 +0200
commitb79a8597b0121263a839be1ebec873e32bd169ed (patch)
tree1e620e0e937dfe7eb4bcd9cefc9a34eb134e1723 /arch/ia64
parenta47047e2b40abefe815313279175859590565c04 (diff)
ia64/err-inject: Use get_user_pages_fast()
[ Upstream commit 69c907022a7d9325cdc5c9dd064571e445df9a47 ] At the point of sysfs callback, the call to gup is done without mmap_sem (or any lock for that matter). This is racy. As such, use the get_user_pages_fast() alternative and safely avoid taking the lock, if possible. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/err_inject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c
index 5ed0ea92c5bf..f851c9d651f0 100644
--- a/arch/ia64/kernel/err_inject.c
+++ b/arch/ia64/kernel/err_inject.c
@@ -142,7 +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(virt_addr, 1, FOLL_WRITE, NULL, NULL);
+ ret = get_user_pages_fast(virt_addr, 1, FOLL_WRITE, NULL);
if (ret<=0) {
#ifdef ERR_INJ_DEBUG
printk("Virtual address %lx is not existing.\n",virt_addr);