Commit c3719273 authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google) Committed by sanglipeng
Browse files

tracing/probes: Fix not to count error code to total length

stable inclusion
from stable-v5.10.188
commit 6ea2a408d3e3cb8a97700d72f1733d95d465e50a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8KYFP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6ea2a408d3e3cb8a97700d72f1733d95d465e50a

--------------------------------

commit b41326b5 upstream.

Fix not to count the error code (which is minus value) to the total
used length of array, because it can mess up the return code of
process_fetch_insn_bottom(). Also clear the 'ret' value because it
will be used for calculating next data_loc entry.

Link: https://lore.kernel.org/all/168908493827.123124.2175257289106364229.stgit@devnote2/



Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/8819b154-2ba1-43c3-98a2-cbde20892023@moroto.mountain/


Fixes: 9b960a38 ("tracing: probeevent: Unify fetch_insn processing common part")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 1b9c6316
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment