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>
This commit is contained in:
Masami Hiramatsu 2019-05-22 17:27:52 +09:00 committed by Steven Rostedt (VMware)
parent 87a90956ee
commit 539b75b2b9

View File

@ -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 */