Message ID | 168908493827.123124.2175257289106364229.stgit@devnote2 (mailing list archive) |
---|---|
State | Accepted |
Commit | b41326b5e0f82e93592c4366359917b5d67b529f |
Delegated to: | Masami Hiramatsu |
Headers | show |
Series | tracing/probes: Fix bugs in process_fetch_insn | expand |
diff --git a/kernel/trace/trace_probe_tmpl.h b/kernel/trace/trace_probe_tmpl.h index 4735c5cb76fa..ed9d57c6b041 100644 --- a/kernel/trace/trace_probe_tmpl.h +++ b/kernel/trace/trace_probe_tmpl.h @@ -204,6 +204,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;