]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/uprobes: Fix to return -EFAULT if copy_from_user failed
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 28 Aug 2018 16:17:47 +0000 (01:17 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 11 Oct 2018 02:19:11 +0000 (22:19 -0400)
commit52060cdaa1b94b6e9ac9393130949a463ee65e12
tree2ab53025647ecc7505e021f60fa646a83dcdccee
parentd986aaf2b0866db903cecc6203f45b476f40fc2a
tracing/uprobes: Fix to return -EFAULT if copy_from_user failed

Fix probe_mem_read() to return -EFAULT if copy_from_user()
failed. The copy_from_user() returns remaining bytes
when it failed, but probe_mem_read() caller expects it
returns error code like as probe_kernel_read().

Link: http://lkml.kernel.org/r/153547306719.26502.8353484532699160223.stgit@devbox
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_uprobe.c