[PATCH 2/2] makedumpfile: Fix a bug

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

 



In cyclic mode, when generating vmcore in elf format, info->bitmap2
is used but not prepared.

Signed-off-by: Zhou wenjian <zhouwj-fnst at cn.fujitsu.com>
---
 makedumpfile.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 7f2949c..88e3389 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -6026,6 +6026,11 @@ get_loads_dumpfile_cyclic(void)
 	if (!(phnum = get_phnum_memory()))
 		return FALSE;
 
+	if (info->flag_cyclic) {
+		if (!prepare_bitmap2_buffer())
+			return FALSE;
+	}
+
 	for (i = 0; i < phnum; i++) {
 		if (!get_phdr_memory(i, &load))
 			return FALSE;
@@ -6069,6 +6074,11 @@ get_loads_dumpfile_cyclic(void)
 		}
 
 	}
+
+	if (info->flag_cyclic) {
+		free_bitmap2_buffer();
+	}
+
 	return num_new_load;
 }
 
@@ -6108,6 +6118,11 @@ write_elf_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_page)
 	if (!(phnum = get_phnum_memory()))
 		return FALSE;
 
+        if (info->flag_cyclic) {
+                if (!prepare_bitmap2_buffer())
+                        return FALSE;
+        }
+
 	gettimeofday(&tv_start, NULL);
 
 	for (i = 0; i < phnum; i++) {
-- 
1.7.1




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux