summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_syscalls.c
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2019-02-20 17:54:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-23 20:11:17 +0100
commit020c90c694dc36b345eeecc59ac48eae88faa983 (patch)
treec4c0b1cbf96df32488350d332ba661ed9beb5499 /kernel/trace/trace_syscalls.c
parentaca126f4a451b36fc6841d7bf76b3a5f4e5d3b01 (diff)
downloadblackbird-obmc-linux-020c90c694dc36b345eeecc59ac48eae88faa983.tar.gz
blackbird-obmc-linux-020c90c694dc36b345eeecc59ac48eae88faa983.zip
tracing/perf: Use strndup_user() instead of buggy open-coded version
commit 83540fbc8812a580b6ad8f93f4c29e62e417687e upstream. The first version of this method was missing the check for `ret == PATH_MAX`; then such a check was added, but it didn't call kfree() on error, so there was still a small memory leak in the error case. Fix it by using strndup_user() instead of open-coding it. Link: http://lkml.kernel.org/r/20190220165443.152385-1-jannh@google.com Cc: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Fixes: 0eadcc7a7bc0 ("perf/core: Fix perf_uprobe_init()") Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace/trace_syscalls.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud