mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
tracing/probes: Fix not to count error code to total length
commitb41326b5e0
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: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/8819b154-2ba1-43c3-98a2-cbde20892023@moroto.mountain/ Fixes:9b960a3883
("tracing: probeevent: Unify fetch_insn processing common part") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
610193a23f
commit
8277bcacf1
1 changed files with 2 additions and 0 deletions
|
@ -143,6 +143,8 @@ process_fetch_insn_bottom(struct fetch_insn *code, unsigned long val,
|
|||
array:
|
||||
/* the last stage: Loop on array */
|
||||
if (code->op == FETCH_OP_LP_ARRAY) {
|
||||
if (ret < 0)
|
||||
ret = 0;
|
||||
total += ret;
|
||||
if (++i < code->param) {
|
||||
code = s3;
|
||||
|
|
Loading…
Reference in a new issue