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

[Crash-utility] [PATCH 01/12] crash-trace-command: use correct index variable



save_record_data() uses a wrong index, it generates incorrect trace.dat.
Urgent bug, fix it!

Signed-off-by: Lai Jiangshan <laijs cn fujitsu com>
---
diff --git a/extensions/trace.c b/extensions/trace.c
index 4b6144f..3bad4af 100755
--- a/extensions/trace.c
+++ b/extensions/trace.c
@@ -3445,7 +3445,7 @@ static int save_record_data(int fd, int nr_cpu_buffers)
 			continue;
 
 		for (j = 0; j < cpu_buffer->nr_linear_pages; j++) {
-			if (ftrace_dump_page(fd, cpu_buffer->linear_pages[i],
+			if (ftrace_dump_page(fd, cpu_buffer->linear_pages[j],
 					page_tmp) < 0) {
 				free(page_tmp);
 				return -1;


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