Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   crash-trace-command: use correct index variable (http://www.linux-archive.org/crash-utility/480406-crash-trace-command-use-correct-index-variable.html)

Lai Jiangshan 01-24-2011 08:35 AM

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;

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 02:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.