[RFC PATCH 17/32] function_graph: Fix to update curr_ret_stack with ARRAY entry size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

__ftrace_return_to_handler() missed to update the curr_ret_stack when it
gets a FGRAPH_TYPE_ARRAY. Since that type entry will follows some data
words, it must update curr_ret_stack by entry size value (__get_index(val))
instead of 1.

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
---
 kernel/trace/fgraph.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index 0f8e9f22e9e0..597250bd30dc 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -740,7 +740,8 @@ static unsigned long __ftrace_return_to_handler(struct fgraph_ret_regs *ret_regs
 		case FGRAPH_TYPE_ARRAY:
 			idx = __get_array(val);
 			fgraph_array[idx]->retfunc(&trace, fgraph_array[idx]);
-			fallthrough;
+			curr_ret_stack -= __get_index(val);
+			break;
 		case FGRAPH_TYPE_RESERVED:
 			curr_ret_stack--;
 			break;





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux