summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2019-01-07 15:33:33 -0800
committerYongqin Liu <yongqin.liu@linaro.org>2020-04-08 11:58:53 +0800
commit7c466efeccc3590a6299e2a79f5ed86568394c63 (patch)
treeac89576264d721b3559589bd8de49255cea4376c
parentca96499b177d3e5d5800d769b6f20d5655c46590 (diff)
downloadhikey-modules-7c466efeccc3590a6299e2a79f5ed86568394c63.tar.gz
MALI: access_ok fix for 5.0-rc
Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: Ie89230fff347595eca9e80de7954a147375020a0
-rw-r--r--utgard/linux/mali_ukk_mem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utgard/linux/mali_ukk_mem.c b/utgard/linux/mali_ukk_mem.c
index db7e482..40e1329 100644
--- a/utgard/linux/mali_ukk_mem.c
+++ b/utgard/linux/mali_ukk_mem.c
@@ -207,8 +207,8 @@ int mem_write_safe_wrapper(struct mali_session_data *session_data, _mali_uk_mem_
kargs.ctx = (uintptr_t)session_data;
/* Check if we can access the buffers */
- if (!access_ok(VERIFY_WRITE, (void __user *)kargs.dest, kargs.size)
- || !access_ok(VERIFY_READ, (void __user *)kargs.src, kargs.size)) {
+ if (!access_ok((void __user *)kargs.dest, kargs.size)
+ || !access_ok((void __user *)kargs.src, kargs.size)) {
return -EINVAL;
}
@@ -266,7 +266,7 @@ int mem_dump_mmu_page_table_wrapper(struct mali_session_data *session_data, _mal
goto err_exit;
user_buffer = (void __user *)(uintptr_t)kargs.buffer;
- if (!access_ok(VERIFY_WRITE, user_buffer, kargs.size))
+ if (!access_ok(user_buffer, kargs.size))
goto err_exit;
/* allocate temporary buffer (kernel side) to store mmu page table info */