summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2019-05-22 17:27:52 +0900
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-05-25 23:04:43 -0400
commit539b75b2b9eece3fc6da5672d4b67440d5e454a9 (patch)
treee723ccc34c3ee552e307deec66520656f5ea5e1c /kernel
parent87a90956eeab260a469a51897bfda27b28adf67d (diff)
downloadlinux-539b75b2b9eece3fc6da5672d4b67440d5e454a9.tar.gz
linux-539b75b2b9eece3fc6da5672d4b67440d5e454a9.tar.bz2
linux-539b75b2b9eece3fc6da5672d4b67440d5e454a9.zip
tracing/kprobe: Cast user-space address correctly
Cast user-space address correctly to pass to probe_user_read(). Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_kprobe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index ff14eb011c1c..2c5357dddb92 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -955,7 +955,9 @@ probe_mem_read(void *dest, void *src, size_t size)
static nokprobe_inline int
probe_mem_read_user(void *dest, void *src, size_t size)
{
- return probe_user_read(dest, src, size);
+ const void __user *uaddr = (__force const void __user *)src;
+
+ return probe_user_read(dest, uaddr, size);
}
/* Note that we don't verify it, since the code does not come from user space */